Moving. /JL
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user