summaryrefslogtreecommitdiff
path: root/cameltris/screens/in_game.py
diff options
context:
space:
mode:
Diffstat (limited to 'cameltris/screens/in_game.py')
-rw-r--r--cameltris/screens/in_game.py3
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):