C Program: The Snake game involves controlling a snake that moves along a 2D plane. The goal is to lead this snake to an apple on the map, that upon eating, increases the length of the snake. As more apples are eaten, the player must be careful as they move the snake, as the game will end if the snake moves back into their tail. For this exercise, you will be implementing a simpler version of Snake. This version involves: Spawning the snake and the apple Moving the snake up/down/left/right in a loop (using u/d/l/r commands) Ending the game when the snake reaches the apple Since this game is fundamentally about moving a snake on a 2D plane, it should make sense to represent this as a 2D array in code. In the starter code provided, you should notice that the first line of code in the main() function defines this array as: enum land map[SIZE][SIZE]; This means that the map is made up only of values defined in the enum land definition above the main() function. Let's have a look at what each value in enum land represents: NOT_VISITED - Indicates a land tile that the snake has not visited yet VISITED - Indicates a land tile that the snake has visited SNAKE - The land tile the snake is currently on APPLE - The land tile the apple is currently on You have been provided a print_map() function that will print the 2D array with the enum land tiles set. Make sure you understand everything mentioned above before reading the example below! #include <stdio.h> #define SIZE 8 enum land { NOT_VISITED, VISITED, SNAKE, APPLE }; void initialise_map(enum land map[SIZE][SIZE]); void print_map(enum land map[SIZE][SIZE]); int main(void) { enum land map[SIZE][SIZE]; initialise_map(map); printf("Welcome to Snake!n"); // TODO: Complete the program HERE return 0; } void initialise_map(enum land map[SIZE][SIZE]) { for (int row = 0; row < SIZE; ++row) { for (int col = 0; col < SIZE; ++col) { map[row][col] = NOT_VISITED; } } } void print_map(enum land map[SIZE][SIZE]) { for (int row = 0; row < SIZE; ++row) { for (int col = 0; col < SIZE; ++col) { if (map[row][col] == NOT_VISITED) { printf(". "); } else if (map[row][col] == VISITED) { printf("- "); } else if (map[row][col] == SNAKE) { printf("S "); } else if (map[row][col] == APPLE) { printf("A "); } } printf("n"); } }.