Moving. /JL

This commit is contained in:
2025-04-21 21:33:34 +02:00
parent a4a4b19d86
commit d5f9188865
3 changed files with 22 additions and 9 deletions

View File

@@ -28,6 +28,8 @@ class Brick:
self.get_image()
self.block_image = pygame.transform.scale(self.img, (48, 48)) if self.img else None
self.draw_brick()
self.x, self.y = (3, 0)
self.location = list((self.x, self.y))
def get_image(self):
match self.color:
@@ -69,10 +71,12 @@ class Brick:
print(f"State set to {self.state}")
def move_right(self):
print("Moving right")
self.x += 1
self.location = (self.x, self.y)
def move_left(self):
print("Moving left")
self.x -= 1
self.location = (self.x, self.y)
def drop(self):
print("Dropping")