Using Arrow key snake can move left, right, top and bottom direction. If you touch the border, game will end.
View this project in Scratch
Scratch
Advanced programming