diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-12 14:20:51 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-12 14:33:32 +0100 |
commit | 71ff729b4d42a28d300c62ac4b436d8143e6a8cc (patch) | |
tree | e2e81b840a1802c76f5a7abb0f258fcab1e63d9f /cameltris/screens/in_game.py | |
parent | 8f82ba5acd095b78fcec9d63f2977c04c778f02b (diff) |
Remove trailing newlines and add blank lines were needed
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'cameltris/screens/in_game.py')
-rw-r--r-- | cameltris/screens/in_game.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cameltris/screens/in_game.py b/cameltris/screens/in_game.py index 242f683..5596ddb 100644 --- a/cameltris/screens/in_game.py +++ b/cameltris/screens/in_game.py @@ -15,6 +15,7 @@ from ..misc import Pause class WouldCollide(Exception): pass + class PlayerQuit(Exception): pass @@ -44,7 +45,6 @@ class Player: self.score_canvas = pygame.Surface((296, 50)) self.level_canvas = pygame.Surface((296, 50)) - def generate_piece(self) -> tuple[Piece, list[int]]: # We may want to make this a function outside the class piece = random.choice((TPiece, SPiece, IPiece, ZPiece, SquarePiece, LPiece, JPiece))() @@ -234,6 +234,7 @@ class Player: if element is not None: self.grid_canvas.blit(element, ((col_idx + self.current_piece_position[1]) * 50 + 1, (row_idx + self.current_piece_position[0]) * 50 + 1)) + def handle_input_pressed(instance, players: list[Player], event: pygame.event.Event) -> None: for player in players: if isinstance(player.controller, instance): |