import math, random, golly as g

#MAP RADIUS
x = 8
y = 8
g.setrule("B3/S23:P%s,%s" %(x*2+1, y*2+1))

#GUI UPDATE FREQUENCY
speed = 1#int(2**14 - 1)

#SOLUTION
solution = g.parse("3bo$b5o$o5bo$7o$3bo$7o$o5bo$b5o2$3bo$2bobo$2bobo$3bo!")
g.putcells(solution, -3, -4, 1, 0, 0, 1, "xor")

#PROBLEM
#for h in range(1):
while True:
	g.update()
	for i in range(speed):
		g.step()
		g.setcell(0,-1,1)
		g.setcell(0,0,random.randint(0,1))
		g.setcell(0,1,random.randint(0,1))
g.update()