commit 047558e55526b46e0c3d861142c46805d2afac04 parent 201996436f8f60031b8737df004b45a1edd86b6e Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Sat, 7 Sep 2019 09:36:25 +0200 Add example to README Diffstat:
M | README.rst | | | 69 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- |
1 file changed, 67 insertions(+), 2 deletions(-)
diff --git a/README.rst b/README.rst @@ -2,10 +2,75 @@ game-of-life ============ Conway's Game of Life implemented in C. -Run `make` to compile and run. The world is displayed as standard output -in the terminal. +Run `make` to compile and `./gameoflife` to run. The world is displayed +as standard output in the terminal. The code is licensed under the GNU General Public License version 3 or later. See ``LICENSE.txt`` for details. Code by Anders Damsgaard https://src.adamsgaard.dk/game-of-life + +Example +------- + + $ ./gameoflife + + Grid dimensions: 20x10 + XXXX.XX...X.XXX..... + .XXX...XX.X......X.. + ....XXXXXXX.X..XXXX. + X.X.X.XXXX..XX.XX..X + .X.X...XXX....XXXX.X + ..X.X..X.X..XX.XX... + XXX.X..X..X....X...X + ..X.....X.X.X.X..XX. + X.X.X.XX..X.XX.XXX.. + .XXXX...X.XXXX....X. + + 0. generation (end with Ctrl-C) + ..X................. + .......XX........X.. + ...X.XXXXX......X.X. + ..X.X.XX.X...X.X.XX. + .X...X.X.......XXX.. + ..X.....XX.....XX.X. + .X.X.......X.X.X.... + .....X..X..X..X.X.X. + ..XX...X....XX...X.. + ...X.......X........ + + 1. generation (end with Ctrl-C) + .................... + .......XX........X.. + ...X.XXXX.......X.X. + ..X.X..XX......X.X.. + .X.X.X.XX.....X.XX.. + ..X...........X.X... + ...............X.... + ..X.........X.X.X... + ............X....X.. + .................... + + 2. generation (end with Ctrl-C) + .................... + .......X.........X.. + ...X..XXX.......X.X. + ..X....XX......X.X.. + .X.X............X... + ..X.............X... + .............X...... + ................X... + .................... + .................... + + 3. generation (end with Ctrl-C) + .................... + .......X.........X.. + ......X.X.......X.X. + ..X....X.......X.X.. + .X.X............X... + ..X................. + .................... + .................... + .................... + ....................