feat: add ability to move piece with arrow keys
This commit is contained in:
@@ -6,7 +6,7 @@ from util.ConfigurationManager import ConfigurationManager
|
||||
For information on the Tetris piece Tetromino go here:
|
||||
https://tetris.fandom.com/wiki/Tetromino
|
||||
'''
|
||||
class Piece:
|
||||
class Piece: # TODO game objects base class / interface?
|
||||
|
||||
def __init__(self, shape, position, color):
|
||||
self.color = color
|
||||
@@ -27,9 +27,9 @@ class Piece:
|
||||
|
||||
def draw(self, surface):
|
||||
tile_size = ConfigurationManager.configuration["engine"]["tile-size"]
|
||||
hex_color = ConfigurationManager.configuration["color"]["languid-lavender"]
|
||||
hex_color = ConfigurationManager.configuration["color"]["border"] # TODO Should abstract color call?
|
||||
|
||||
base_color = pygame.Color(self.color) # TODO Should abstract color call?
|
||||
base_color = pygame.Color(self.color)
|
||||
border_color = pygame.Color(hex_color)
|
||||
|
||||
for sub_points in self.points:
|
||||
|
||||
Reference in New Issue
Block a user