Hi, thanks for comment, snake moves in intervals every .3 sec so not immediately after key press, so last registered key before move event will be new direction, not the first one.
I'm working on a snake game myself I've actually found a few different solutions to this problem does the snake use a timer to detect when to move
However I just tried the game and it seems fine to me