wasd
This commit is contained in:
parent
fa0e8614db
commit
cf1dcee5a5
1 changed files with 7 additions and 7 deletions
8
snek.py
8
snek.py
|
@ -50,13 +50,13 @@ class Snek():
|
|||
pygame.quit()
|
||||
sys.exit()
|
||||
elif event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_UP:
|
||||
if event.key == pygame.K_UP or event.key == pygame.K_w:
|
||||
self.turn(UP) # all da way
|
||||
elif event.key == pygame.K_DOWN:
|
||||
elif event.key == pygame.K_DOWN or event.key == pygame.K_s:
|
||||
self.turn(DOWN) # for what?
|
||||
elif event.key == pygame.K_LEFT:
|
||||
elif event.key == pygame.K_LEFT or event.key == pygame.K_a:
|
||||
self.turn(LEFT)
|
||||
elif event.key == pygame.K_RIGHT:
|
||||
elif event.key == pygame.K_RIGHT or event.key == pygame.K_d:
|
||||
self.turn(RIGHT)
|
||||
|
||||
class Food():
|
||||
|
|
Loading…
Add table
Reference in a new issue