Question: Write code in Java Essentially in this exercise the world contains a snake (or worm) as shown in the picture below. The head is marked


Write code in Java
Essentially in this exercise the world contains a snake (or worm) as shown in the picture below. The head is marked in blue, the rest of the body is in red. The snake moves in the direction of the head in one of four directions: north, east, south and west. As the snake moves you can change its direction of movement in real time by pressing the right key. The following table summarizes that information: pressing this key (or keys) will set the direction of movement to 8 (or up-arrow) 6 (or right-arrow) 2 (or down-arrow) 4 (or left-arrow) north east south west will cause the snake to stop Here now are some snapshots: This is the starting position for my game. Snake is not moving
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
