kopia lustrzana https://github.com/villares/sketch-a-day
Update sketch_2020_04_24b.pyde
rodzic
bb440bb5b9
commit
4fa1ef910d
|
|
@ -111,18 +111,6 @@ def keyPressed():
|
||||||
if key == ' ':
|
if key == ' ':
|
||||||
init()
|
init()
|
||||||
chains[:] = []
|
chains[:] = []
|
||||||
if key == 's':
|
|
||||||
shuff()
|
|
||||||
|
|
||||||
|
|
||||||
def shuff():
|
|
||||||
for y in range(0, rows, 2):
|
|
||||||
on = choice((True, False))
|
|
||||||
for x in range(cols):
|
|
||||||
if x % 2 == 1:
|
|
||||||
if x % 4:
|
|
||||||
on = not on
|
|
||||||
grid[(x, y)] = on
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
for y in range(rows):
|
for y in range(rows):
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue