Allow zqsd for moves
This commit is contained in:
parent
14bc17f91c
commit
9ba1ceff72
1 changed files with 4 additions and 4 deletions
8
main.py
8
main.py
|
@ -52,13 +52,13 @@ def main():
|
||||||
logger.warning('Received QUIT event')
|
logger.warning('Received QUIT event')
|
||||||
return
|
return
|
||||||
if event.type == pglocals.KEYDOWN:
|
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
|
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
|
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
|
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
|
snake.direction = Direction.RIGHT
|
||||||
|
|
||||||
dirty_rects = snake.move(screen, apple)
|
dirty_rects = snake.move(screen, apple)
|
||||||
|
|
Loading…
Reference in a new issue