Feb-10-2021, 05:17 PM
I would pass the canvas as an argument to ship.__init__ instead of depending on the global c1 and move bind outside the ship class.
I'd also toss the ship.x and ship.y since they are unused, or modify the ship.move() method to keep track of where the ship is.
I'd also toss the ship.x and ship.y since they are unused, or modify the ship.move() method to keep track of where the ship is.
def move(self,x,y): self.x += x self.y += y self.move(self.id, x, y)