Skip to content

Commit 73c973e

Browse files
committed
Minor edits to documentation.
1 parent 7d1c26e commit 73c973e

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,22 @@ Running `combatturtles.py` from the command line automatically initiates a game.
6565
```
6666
usage: combatturtles.py [-h] [-v] [-f P1] [-s P2] [-a A] [-c LIM]
6767
68-
Initializes a game of Combat Turtles. Command line arguments can be supplied to
69-
specify player AIs and the arena (see below for details). Excluding any of these
70-
arguments will prompt the user to specify them on startup.
68+
Initializes a game of Combat Turtles. Command line arguments can be supplied
69+
to specify player AIs and the arena (see below for details). Excluding any of
70+
these arguments will prompt the user to specify them on startup.
7171
72-
Note that the player AIs are indexed alphabetically, which may cause indices to
73-
change as new modules are added to the ai/ directory.
72+
Note that the player AIs are indexed alphabetically, which may cause indices
73+
to change as new modules are added to the ai/ directory.
7474
7575
optional arguments:
7676
-h, --help show this help message and exit
7777
-v, --version show program's version number and exit
78-
-f P1, --first P1 player 1 ID
79-
-s P2, --second P2 player 2 ID
80-
-a A, --arena A arena ID
81-
-c LIM, --cutoff LIM iteration cutoff
78+
-f P1, --first P1 player 1 AI index
79+
-s P2, --second P2 player 2 AI index
80+
-a A, --arena A arena index
81+
-c LIM, --cutoff LIM iteration cutoff (default: unlimited)
8282
83-
See full documentation online at <adam-rumpf.github.io/combat-turtles>
83+
See full documentation online at <adam-rumpf.github.io/combat-turtles>.
8484
```
8585

8686
In both cases the turtle AIs are indexed alphabetically beginning with `0`, which may change as more AI modules are added to the `ai/` directory. If a given ID is unspecified or invalid, the user will be asked to specify a value in the text-driven menu.

combatturtles.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@ def _arena_table(arenas):
177177
Released under MIT License <github.com/adam-rumpf/combat-turtles>
178178
"""
179179
_desc = """
180-
Initializes a game of Combat Turtles. Command line arguments can be supplied to
181-
specify player AIs and the arena (see below for details). Excluding any of these
182-
arguments will prompt the user to specify them on startup.
180+
Initializes a game of Combat Turtles. Command line arguments can be supplied
181+
to specify player AIs and the arena (see below for details). Excluding any of
182+
these arguments will prompt the user to specify them on startup.
183183
184-
Note that the player AIs are indexed alphabetically, which may cause indices to
185-
change as new modules are added to the ai/ directory.
184+
Note that the player AIs are indexed alphabetically, which may cause indices
185+
to change as new modules are added to the ai/ directory.
186186
"""
187187
_epil = ("See full documentation online at " +
188-
"<adam-rumpf.github.io/combat-turtles>")
188+
"<adam-rumpf.github.io/combat-turtles>.")
189189

190190
# Initialize game (options can be set from command line)
191191
if __name__ == "__main__":
@@ -198,13 +198,14 @@ def _arena_table(arenas):
198198
# Define arguments
199199
parser.add_argument("-v", "--version", action="version", version=_vers)
200200
parser.add_argument("-f", "--first", action="store", default=-1,
201-
type=int, dest="p1", help="player 1 ID")
201+
type=int, dest="p1", help="player 1 AI index")
202202
parser.add_argument("-s", "--second", action="store", default=-1,
203-
type=int, dest="p2", help="player 2 ID")
203+
type=int, dest="p2", help="player 2 AI index")
204204
parser.add_argument("-a", "--arena", action="store", default=-1,
205-
type=int, dest="a", help="arena ID")
205+
type=int, dest="a", help="arena index")
206206
parser.add_argument("-c", "--cutoff", action="store", default=-1,
207-
type=int, dest="lim", help="iteration cutoff")
207+
type=int, dest="lim",
208+
help="iteration cutoff (default: unlimited)")
208209

209210
# Parse command line arguments
210211
args = parser.parse_args()

0 commit comments

Comments
 (0)