allowing runtime options

This commit is contained in:
Jonas Weinz 2017-05-27 12:06:47 +02:00
parent 23fa2a0733
commit 6a10459496
12 changed files with 22 additions and 3 deletions

View File

@ -337,7 +337,7 @@ def main():
settings["steps"] = 20 settings["steps"] = 20
settings["w"] = livingSpaceWidth settings["w"] = livingSpaceWidth
settings["h"] = livingSpaceHeight settings["h"] = livingSpaceHeight
settings["calc"] = False settings["calc"] = 0
settings["fullscreen"] = False settings["fullscreen"] = False
settings["window_w"] = window_w settings["window_w"] = window_w
settings["window_h"] = window_h settings["window_h"] = window_h

View File

@ -43,7 +43,7 @@ optional arguments:
* if no arguments are given, the program will ask the user at the runtime for the requested arguments. * if no arguments are given, the program will ask the user at the runtime for the requested arguments.
keys: ## keys
| key | function | | key | function |
| ---------------------- | ---------------------------------------- | | ---------------------- | ---------------------------------------- |
@ -54,6 +54,18 @@ keys:
| ctrl left / ctrl right | rotate ant (in configuration mode) | | ctrl left / ctrl right | rotate ant (in configuration mode) |
| escape | exit program | | escape | exit program |
## patterns:
| pattern name | with standard ant | with multicolor ant |
| ------------ | -------------------- | -------------------- |
| 0 | ![](doc/p0a.png) | ![](doc/p0a.png) |
| 1 | ![](doc/p1a.png) | ![](doc/p1b.png) |
| check | ![](doc/pchecka.png) | ![](doc/pcheckb.png) |
| horizontal | ![](doc/pha.png) | ![](doc/phb.png) |
| vertical | ![](doc/pva.png) | ![](doc/pvb.png) |
## examples ## examples
* run standard langton's ant and write number of living cells per timestep to 'out.txt': * run standard langton's ant and write number of living cells per timestep to 'out.txt':
@ -80,4 +92,11 @@ keys:
./Main.py --w 320 --h 180 --code 110001000111 --steps 1000 ./Main.py --w 320 --h 180 --code 110001000111 --steps 1000
``` ```
* run the multicolored ant 'RRLLLRLLLRRR' on a field with size 320x180 and calculate the result after 10.000 steps
```
./Main.py --w 320 --h 180 --code 110001000111 --calc 10000
```

BIN
langton/doc/example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
langton/doc/p0a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
langton/doc/p1a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
langton/doc/p1b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
langton/doc/pchecka.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
langton/doc/pcheckb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
langton/doc/pha.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
langton/doc/phb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
langton/doc/pva.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
langton/doc/pvb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB