Skip to content
Snippets Groups Projects
Commit b94a209d authored by ugurthemaster's avatar ugurthemaster
Browse files

Update conwaylife.py

Import statements have been moved to the top of the file.
parent 39763c6c
No related branches found
No related tags found
No related merge requests found
#import essential libraries
import lcd
import pyb
# do 1 iteration of Conway's Game of Life # do 1 iteration of Conway's Game of Life
def conway_step(): def conway_step():
for x in range(128): # loop over x coordinates for x in range(128): # loop over x coordinates
...@@ -37,8 +41,6 @@ def conway_go(num_frames): ...@@ -37,8 +41,6 @@ def conway_go(num_frames):
pyb.delay(300) pyb.delay(300)
# PC testing # PC testing
import lcd
import pyb
lcd = lcd.LCD(128, 32) lcd = lcd.LCD(128, 32)
conway_rand() conway_rand()
conway_go(1000) conway_go(1000)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment