From 71ff729b4d42a28d300c62ac4b436d8143e6a8cc Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 12 Nov 2021 14:20:51 +0100 Subject: Remove trailing newlines and add blank lines were needed Signed-off-by: Olivier Gayot --- cameltris/screens/in_game.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cameltris/screens/in_game.py') 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): -- cgit v1.2.3