Page 1 of 1

Conway's Game of Life - UZZT

Posted: Fri Oct 09, 2009 9:57 am
by Truncheon
Conway's Game of Life:

http://www.youtube.com/watch?v=hBp3j_Uah8w

Code: Select all

:main
#set y
#set x
:loop
#set a
#set north y -- north
#set ney y -- ney
#set nex x ++ nex
#set nwy y -- nwy
#set nwx x -- nwx
#set south y ++ south
#set sey y ++ sey
#set sex x ++ sex
#set swy y ++ swy
#set swx x -- swx
#set east x ++ east
#set west x -- west

#ifa y x solid
#ifa ney nex solid ++ a
#ifa nwy nwx solid ++ a
#ifa sey sex solid ++ a
#ifa swy swx solid ++ a
#ifa north x solid ++ a
#ifa south x solid ++ a 
#ifa y west solid ++ a
#ifa y east solid ++ a
#if a gt 1
#if a lt 4 #put alt y x solid
#endif

#ifa not y x solid
#ifa ney nex solid ++ a
#ifa nwy nwx solid ++ a
#ifa sey sex solid ++ a
#ifa swy swx solid ++ a
#ifa north x solid ++ a
#ifa south x solid ++ a 
#ifa y west solid ++ a
#ifa y east solid ++ a
#if a eq 3 #put alt y x solid
#endif

#++ x
#if x eq 60
#set x 0 ++ y
#endif

#if y eq 25 pend
#loop
:pend
#altswap
#idle main

Posted: Fri Oct 09, 2009 12:35 pm
by Zenith Nadir
when i was like 7 years old i went on holiday with my parents to wales and we visited conwy castle because i was obsessed with medieval lego at the time, and every time somebody mentions conway's game of life i think of conwy castle + also most other castles in north wales

:rocket: