Make absolutely certain we sent a direction turn command

This commit is contained in:
sigonasr2 2022-08-17 13:08:08 -05:00
parent 4e03338291
commit c34811fdf4
2 changed files with 8 additions and 6 deletions

8
data
View File

@ -1,7 +1,7 @@
Hit other
923
500
62775
504
63224
954
Bot 5653
Bot 5653

View File

@ -166,10 +166,12 @@ snake.onTick = function(obj) { // When the game updates
}
function setDirection(dir) {
if (myDir!==dir) {
for (var i=0;i<10;i++) {
snake.setDirection(dir)
myDir=dir
}
myDir=dir
}
function spotIsFree(dir, x, y) {