diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-02-13 14:38:02 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-02-13 14:38:11 +0100 |
commit | 89c3dc6b99f32ee0eacdf34d179dff797ad90c4a (patch) | |
tree | aeefa6fe8ca972afd29a65ecb7a5f5c15207bf10 | |
parent | 064f7d3ea50c3dab2262b414dfc80a5c0f6bef32 (diff) |
Rename stick piece lock piece
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
-rwxr-xr-x | cameltris.py | 8 |
1 files changed, 4 insertions, 4 deletions
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() |