summaryrefslogtreecommitdiff
path: root/examples/conwaylife.py
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2017-05-29 10:08:14 +0300
committerVille Skyttä <ville.skytta@iki.fi>2017-05-29 11:36:05 +0300
commitca16c3821053e5bf2b87aeb10007f73f31dc1eac (patch)
tree28b394ba7ef2e107c5fb3112c7ba97f01b6915f1 /examples/conwaylife.py
parente5e49bedcb0ed353ee22ba99078301d9ccd87dbf (diff)
various: Spelling fixes
Diffstat (limited to 'examples/conwaylife.py')
-rw-r--r--examples/conwaylife.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/conwaylife.py b/examples/conwaylife.py
index f99796175..323f42e85 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():