Open lydell opened 8 years ago
Thanks.
One simple and short ( 2 bytes ) way to work around the problem is to switch from directional to steering controls so that only the ← and → keys are needed.
This is done by replacing d=e.keyCode&3
with d=d-e.keyCode&3
But directional controls don't need any explanation and this other controls scheme takes more practice to master.
What do you think ?
I know that some Snake versions do have steering controls, but I've never played one. I guess I'd suck at using them.
It's your program – you decide. Personally, I'd try to find some clever way to noop the arrow key in the opposite direction, even if it costs a few bytes.
Example steps to reproduce:
Actual result: The game stops. Expected result: The game continues as if no key was pressed at all.
I find myself pressing the wrong keys by mistake a lot, so to me the game isn't really playable. Nevertheless, impressive golfing!