kopia lustrzana https://github.com/villares/sketch-a-day
Update sketch_2020_09_15polyominoes.pyde
rodzic
b47451edd1
commit
212fb396e2
|
|
@ -4,12 +4,12 @@ https://pyvideo.org/kiwi-pycon-2013/polyominoes-an-exploration-in-problem-solvin
|
||||||
"""
|
"""
|
||||||
from polyomino import Polyomino
|
from polyomino import Polyomino
|
||||||
|
|
||||||
x, y, w = 5, 5, 5
|
x, y, w = 5, 3, 3
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
size(640, 480)
|
size(750, 550)
|
||||||
background(0)
|
background(0)
|
||||||
print(count_polys(10))
|
print(count_polys(8))
|
||||||
|
|
||||||
def count_polys(target):
|
def count_polys(target):
|
||||||
global x, y
|
global x, y
|
||||||
|
|
@ -33,6 +33,4 @@ def count_polys(target):
|
||||||
x = 0
|
x = 0
|
||||||
y += len(p) * w
|
y += len(p) * w
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return len(polyominoes)
|
return len(polyominoes)
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue