feat: add logic that allows piece to move
This commit is contained in:
@@ -35,9 +35,15 @@ class Piece:
|
||||
for sub_points in self.points:
|
||||
pygame.draw.polygon(surface, base_color, sub_points, 0)
|
||||
pygame.draw.polygon(surface, border_color, sub_points, max(tile_size // 6, 1))
|
||||
|
||||
|
||||
def move(self, vector):
|
||||
for sub_points in self.points:
|
||||
for point in sub_points:
|
||||
point[0] += vector[0]
|
||||
point[1] += vector[1]
|
||||
|
||||
# rotate the piece clockwise
|
||||
def rotate():
|
||||
def rotate(self):
|
||||
pass
|
||||
|
||||
# shape attributes
|
||||
|
||||
Reference in New Issue
Block a user