Snake stops when arrow keys are released

Bug #628215 reported by Josh Brown
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snakes
Fix Released
High
Tom Bell

Bug Description

The snake stops when no arrow keys are being held down. This should not happen as it defeats the point of the game.

Josh Brown (joshbrown)
Changed in snakes-game:
importance: Undecided → High
milestone: none → 1.0
status: New → Triaged
Revision history for this message
Tom Bell (bushbaby2511) wrote :

Merge proposal fixes this bug and adds scoring support.

Revision history for this message
Josh Brown (joshbrown) wrote :

I'm working on a fix for this but am having trouble with key presses: http://stackoverflow.com/questions/3651709/

Changed in snakes-game:
assignee: nobody → Josh Brown (joshbrown)
Revision history for this message
Tom Bell (bushbaby2511) wrote :

To run keypresses on a more Event styled approach then use python.cbreak() [Documentation here: http://docs.python.org/library/curses.html#curses.cbreak]. In this mode the getch() method returns the next character from the queue of user input or -1 on no input so doesn't wait for input for updating.

This works in my branch if you want to use the code or try a different approach?

Revision history for this message
Josh Brown (joshbrown) wrote :

Sorry about that, I hadn't noticed that commit. I'll take a look at it.

Changed in snakes-game:
assignee: Josh Brown (joshbrown) → Tom Bell (bushbaby2511)
status: Triaged → Fix Committed
Revision history for this message
Josh Brown (joshbrown) wrote :
Changed in snakes-game:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.