Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tiny implementation of Conway's game of life.
#define _+o[~$&1][O
o[2][992],$;main(O){
for(;gets(o);$++)for
(puts("\e[H"),O=32;O
++<960;)putchar(O%32
?" O"[o[$&1][O]=3==(
_-33]_-32]_-1]_-31]_
+1]_+31]_+32]_+33]|_
])|O%9&!$]:10);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.