aboutsummaryrefslogtreecommitdiff
path: root/src/splitscreen_duo/games/pong.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/splitscreen_duo/games/pong.py')
-rw-r--r--src/splitscreen_duo/games/pong.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/splitscreen_duo/games/pong.py b/src/splitscreen_duo/games/pong.py
index aa3d8a3..7f0d4e9 100644
--- a/src/splitscreen_duo/games/pong.py
+++ b/src/splitscreen_duo/games/pong.py
@@ -178,13 +178,14 @@ class Pong(GameBase):
if not self.score_display_time:
for event in pygame.event.get():
result = self.handle_common_events(event)
+ action = self.input_handler.get_input(event)
if result is not None:
return result
elif event.type == pygame.KEYDOWN:
- if event.key == pygame.K_LEFT:
+ if action == "LEFT":
self.move_player_paddle(-PADDLE_SPEED)
- elif event.key == pygame.K_RIGHT:
+ elif action == "RIGHT":
self.move_player_paddle(PADDLE_SPEED)
keys = pygame.key.get_pressed()