Skip to content

Instantly share code, notes, and snippets.

@justecorruptio
Last active October 24, 2017 08:04
Show Gist options
  • Save justecorruptio/7276028 to your computer and use it in GitHub Desktop.
Save justecorruptio/7276028 to your computer and use it in GitHub Desktop.
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