allowing runtime options
@ -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
|
||||||
|
@ -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
After Width: | Height: | Size: 35 KiB |
BIN
langton/doc/p0a.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
langton/doc/p1a.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
langton/doc/p1b.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
langton/doc/pchecka.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
langton/doc/pcheckb.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
langton/doc/pha.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
langton/doc/phb.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
langton/doc/pva.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
langton/doc/pvb.png
Normal file
After Width: | Height: | Size: 14 KiB |