From 9ba1ceff720de9b0a619bddc30ca8177fb925430 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 30 Apr 2018 20:28:56 +0200 Subject: [PATCH] Allow zqsd for moves --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index fe8740b..6db0c09 100644 --- a/main.py +++ b/main.py @@ -52,13 +52,13 @@ def main(): logger.warning('Received QUIT event') return if event.type == pglocals.KEYDOWN: - if event.key == pglocals.K_DOWN: + if event.key == pglocals.K_DOWN or event.key == pglocals.K_s: snake.direction = Direction.DOWN - elif event.key == pglocals.K_LEFT: + elif event.key == pglocals.K_LEFT or event.key == pglocals.K_q: snake.direction = Direction.LEFT - elif event.key == pglocals.K_UP: + elif event.key == pglocals.K_UP or event.key == pglocals.K_z: snake.direction = Direction.UP - elif event.key == pglocals.K_RIGHT: + elif event.key == pglocals.K_RIGHT or event.key == pglocals.K_d: snake.direction = Direction.RIGHT dirty_rects = snake.move(screen, apple)