Hello i have designed a maze and i want to draw a path between the cells as the 'person' moves from one cell to the next. So each time i move the cell a line is drawn Also i am using the graphics module
The graphics module is an object oriented library
Im importing
my circle which is my cell
Now it says getX not defined every time i press a key is this because of p2???
ive found this in the module about Point
The graphics module is an object oriented library
Im importing
Code:
from graphics import* from maze import*
Code:
center = Point(15, 15)
c = Circle(center, 12)
c.setFill('blue')
c.setOutline('yellow')
c.draw(win)
p1 = Point(c.getCenter().getX(), c.getCenter().getY())
this is my loop
if mazez.blockedCount(cloc)> 2:
mazez.addDecoration(cloc, "grey")
mazez[cloc].deadend = True
c.move(-25, 0)
p2 = Point(p1.getX(), p1.getY())
line = graphics.Line(p1, p2)
cloc.col = cloc.col - 1
ive found this in the module about Point
Code:
class Point(GraphicsObject)
Method resolution order:
Point
GraphicsObject
builtins.object
Methods defined here:
__init__(self, x, y)
clone(self)
getX(self)
getY(self)
Comment