various: Spelling fixes
This commit is contained in:
@@ -8,7 +8,7 @@ lcd.light(1)
|
||||
def conway_step():
|
||||
for x in range(128): # loop over x coordinates
|
||||
for y in range(32): # loop over y coordinates
|
||||
# count number of neigbours
|
||||
# count number of neighbours
|
||||
num_neighbours = (lcd.get(x - 1, y - 1) +
|
||||
lcd.get(x, y - 1) +
|
||||
lcd.get(x + 1, y - 1) +
|
||||
@@ -25,7 +25,7 @@ def conway_step():
|
||||
if self and not (2 <= num_neighbours <= 3):
|
||||
lcd.pixel(x, y, 0) # not enough, or too many neighbours: cell dies
|
||||
elif not self and num_neighbours == 3:
|
||||
lcd.pixel(x, y, 1) # exactly 3 neigbours around an empty cell: cell is born
|
||||
lcd.pixel(x, y, 1) # exactly 3 neighbours around an empty cell: cell is born
|
||||
|
||||
# randomise the start
|
||||
def conway_rand():
|
||||
|
||||
Reference in New Issue
Block a user