Langton's ant: Difference between revisions

(Python)
Line 274:
 
i = 0
while i < nsteps and x >= 0 and y ><= 0 and x < width and 0 <= y < height:
turn = Turn.left if M[y][x] == Color.black else Turn.right
M[y][x] = Color.white if M[y][x] == Color.black else Color.black
Anonymous user