disk polyominoes

This commit is contained in:
2022-09-27 19:01:17 -04:00
parent c13b0f4556
commit c2ebf92a0e
4 changed files with 19 additions and 7 deletions

View File

@ -7,7 +7,7 @@ from kivy.core.window import Window
from kivy.graphics import Color,Line
from point import Point
from polyomino import Cross
from polyomino import Cross,Disk
from tools import remove_fromlist
@ -215,7 +215,8 @@ class Painter(Widget):
# create new particle
if touch.button=="right":
new=Cross(touchx,touchy)
#new=Cross(touchx,touchy)
new=Disk(touchx,touchy)
# snap to lattice
if self.lattice!=None:
new.move(self.lattice.nearest_delta(new.elements[0].pos))