Open tofumatt opened 12 years ago
The current implementation may be flawed because it actually just divides the canvas into two touch zones (up/down OR left/right), depending on what two directions are even possible at this given moment. But that enables the problem you mention.
If instead we divided it into four zones somehow, the click targets would be much smaller, but would probably avoid this issue.
If the user taps the upper portion of the canvas when the snake is already travelling upward, their direction is changed (to left or right). This is confusing, especially if they are frantically tapping in a heated moment in the game and they then turn and die.
We should ignore input that is redundant (if you touch the top and are already travelling up: do nothing).