optimize snake movement a bit

do some bit fiddling rather than a case statement