When a key is pressed that is not 'q' or an arrow key, the game crashes
Bug #631673 reported by
Josh Brown
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snakes |
Fix Released
|
Critical
|
Josh Brown |
Bug Description
When a key is pressed that is not 'q' or an arrow key, the game ends with the following error message:
Traceback (most recent call last):
File "./snakes", line 135, in <module>
curses.
File "/usr/lib/
return func(stdscr, *args, **kwds)
File "./snakes", line 127, in main
else: snake.update(None)
File "./snakes", line 70, in update
self.
File "./snakes", line 58, in update
if type(direction[0]) is int and type(direction[1]) is int:
TypeError: 'NoneType' object is unsubscriptable
Related branches
lp:~snakes-game/snakes-game/trunk
(Merged)
To post a comment you must log in.
This is not only a high-priority bug in itself, but will also prevent the implementation of perpetual motion (bug #628215).