diff options
Diffstat (limited to 'examples/conwaylife.py')
-rw-r--r-- | examples/conwaylife.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/conwaylife.py b/examples/conwaylife.py index f99796175f..323f42e850 100644 --- a/examples/conwaylife.py +++ b/examples/conwaylife.py @@ -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(): |