INNER CODE UNIT · Python

move

metafy-social/python-scripts · scripts/Brick-Breaker-Python/main.py:47

    def move(self):
        self.x += self.x_vel
        self.y += self.y_vel

    def set_vel(self, x_vel, y_vel):
        self.x_vel = x_vel
        self.y_vel = y_vel

    def draw(self, win):
        pygame.draw.circle(win, self.color, (self.x, self.y), self.radius)


class Brick:
    def __init__(self, x, y, width, height, health, colors):
        self.x = x
        self.y = y
        self.width = width
        self.height = height

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…