diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | life.cc | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -2,4 +2,4 @@ ...is a straight forward toy implementation of Conway's Game of Life. It is written in C++ using `termbox` for drawing in the terminal. _Divine intervention_ i.e. manipulating the world state is supported using the mouse. -[![asciicast](https://asciinema.org/a/b8ikx32sc5fe427b86y7kjgh7.png)](https://asciinema.org/a/b8ikx32sc5fe427b86y7kjgh7) +[![asciicast](https://asciinema.org/a/f4nc8r6v1tf2m97s6m81ci37q.png)](https://asciinema.org/a/f4nc8r6v1tf2m97s6m81ci37q) @@ -22,7 +22,11 @@ void draw( if ( world.isLifeAt(i-x, j-y) ) { tb_change_cell(i, j, 48+density, TB_BLACK, TB_GREEN); } else { - tb_change_cell(i, j, 48+density, TB_BLACK, TB_BLUE); + if ( density == 0 ) { + tb_change_cell(i, j, ' ', TB_BLACK, TB_BLUE); + } else { + tb_change_cell(i, j, 48+density, TB_BLACK, TB_BLUE); + } } }); |