Play Simulation
1k Game of Life's itch.io pageCharacters/Bytes used
358
Source Code
g={}for y=0,128 do g[y]={} for x=0,128 do if((flr(rnd(2))+1)==1)g[y][x]=true else g[y][x]=false end end
::★::cls()ng={} for y=0,128 do ng[y]={} for x=0,128 do nc=0 for dy=-1,1 do for dx=-1,1 do if not (dy==0and dx==0)and g[y+dy]and g[y+dy][x+dx] then nc+=1 end end end
ng[y][x]=nc==3or(g[y][x]and nc==2) if(g[y][x])pset(x,y,7) end end
g=ng flip() goto ★
Leave a comment
Log in with itch.io to leave a comment.
Comments
Nice one
(...and only used about a quarter of the budget!)
Thanks! I think the uncompressed code is about 700 to 800 chars and I decided to compress it even further.
I'm a simple man, I see Conway's game of life, I like.