Mr. Conway in 50 lines of code (Posting On Python-List Prohibited)
Lawrence D’Oliveiro
lawrencedo99 at gmail.com
Sun Dec 31 18:48:24 EST 2017
On Sunday, December 31, 2017 at 11:13:41 PM UTC+13, Wu Xi wrote:
> yield x + 1 , y
> yield x - 1 , y
> yield x , y + 1
> yield x , y - 1 # this is proof that life can emerge inside of computers and cellular automatons,
>
> yield x + 1 , y + 1 # and evolve through memory, attack other cells and morph into toads, pulsars, etc..
> yield x + 1 , y - 1
> yield x - 1 , y + 1 # spray your memory with space alien patterns and life evolution will start in your machine !
> yield x - 1 , y - 1
for i in range(-1, 2) :
for j in range(-1, 2) :
if i != j :
yield x + i, y + j
#end if
#end for
#end for
which is half the number of lines of code.
More information about the Python-list
mailing list