kopia lustrzana https://github.com/villares/sketch-a-day
Update sketch_2020_04_24a.pyde
rodzic
91cbeeb55f
commit
bb440bb5b9
|
|
@ -61,7 +61,7 @@ def draw():
|
|||
else:
|
||||
line(x - mtm, y - mtm, x + mtm, y - mtm)
|
||||
|
||||
gif_export(GifMaker, sketch_name)
|
||||
# gif_export(GifMaker, sketch_name)
|
||||
|
||||
for _ in range(10):
|
||||
pick_one()
|
||||
|
|
@ -109,19 +109,8 @@ def keyPressed():
|
|||
if key == ' ':
|
||||
init()
|
||||
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():
|
||||
for y in range(rows):
|
||||
on = choice((True, False))
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue