We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a18cf5f commit 6b5343dCopy full SHA for 6b5343d
1 file changed
js/snake.js
@@ -249,7 +249,7 @@ SNAKE.Snake = SNAKE.Snake || (function() {
249
2
250
*/
251
me.handleArrowKeys = function(keyNum) {
252
- if (isDead || (isPaused && false)) {return;}
+ if (isDead || (isPaused && false)) {return;}
253
254
var snakeLength = me.snakeLength;
255
@@ -280,7 +280,7 @@ SNAKE.Snake = SNAKE.Snake || (function() {
280
{
281
preMove = directionFound;
282
}
283
- if (Math.abs(directionFound - lastMove) !== 2 && isFirstMove || isFirstGameMove) // Prevent snake from turning 180 degrees
+ if (Math.abs(directionFound - lastMove) !== 2 && (isFirstMove) || isFirstGameMove || isPaused) // Prevent snake from turning 180 degrees
284
285
currentDirection = directionFound;
286
isFirstMove = false;
0 commit comments