From 89c3dc6b99f32ee0eacdf34d179dff797ad90c4a Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sat, 13 Feb 2021 14:38:02 +0100 Subject: Rename stick piece lock piece Signed-off-by: Olivier Gayot --- cameltris.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cameltris.py') diff --git a/cameltris.py b/cameltris.py index 68b4c9a..6d33718 100755 --- a/cameltris.py +++ b/cameltris.py @@ -207,7 +207,7 @@ class Player: return len(rows_to_burn) - def stick_piece(self): + def lock_piece(self): for row_id, row in enumerate(self.current_piece.elements): for col_id, element in enumerate(row): if element is None: @@ -321,7 +321,7 @@ class Player: try: self.move_piece_down() except WouldCollide: - self.stick_piece() + self.lock_piece() def handle_input_released(self, event): if self.controller.get_input_up(event) == Input.MOVE_DOWN: @@ -452,7 +452,7 @@ while True: try: player.move_piece_down() except WouldCollide: - player.stick_piece() + player.lock_piece() player.pressing_down_countdown = 2 elif player.pressing_down_countdown is not None: player.pressing_down_countdown -= 1 @@ -462,7 +462,7 @@ while True: try: player.move_piece_down() except WouldCollide: - player.stick_piece() + player.lock_piece() refresh_screen() pygame.display.update() -- cgit v1.2.3