s1ay3r44

Game Of Life GBA

Feb 19th, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include<tonc.h>
  2. #define l for(x=0;++x<239;)for(y=0;++y<159;)
  3. main(){R=1028;*P=32767;u8 x,y,s,m,p;for(;!(S=~K&1023););l M(x,y,Q()&1);for(;u8*v=(u8*)V;){F();l{for(m=-1,p=v[x+y*240],s=-p;++m<9;)s+=v[x+m%3-1+(y+m/3-1)*240];M(x,y,p?s<4&s>1:s==3);}}}
Add Comment
Please, Sign In to add comment