Nov-16-2018, 04:32 PM
(This post was last modified: Nov-16-2018, 04:33 PM by ichabod801.)
I'm not sure if this is the issue, but when you create the Circle or Rectangle classes, you store the details of the shape in various values: self.__startX, self.startY, and so on. But then when you draw them, you require the values to be passed to the draw method as parameters. I would just use the values you already stored. So line 22 of the rectangle class is
turtle.goto(__startX, __startY)
. I would remove __startX and __startY from the parameter list of draw, and instead use turtle.goto(self.__startX, self.__startY)
. Then do the same for all of the other variables used in the draw method.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures