Harvey Mudd College CS60 Final Homework Assignment
Our final assignment in CS60 was to implement a version of the popular game Snake, called Spampede where the "snake" eats pieces of Spam in order to grow. It is important to mention that we were given some of the backend code by our instructors.
The snake was implemented using a linked list data structure with front of the list acting as the head and the end of the list acting as the tail. The snake is controlled using keyboard inputs from the user and is also able to reverse itself (flip the head and tail).
My partner and I were able to successfully implement a functional board for the game to operate on.In addition, the main part of the assignment was to implement an AI mode where the AI takes over and controls the snake. We utilized a BFS for our AI to decide where the snake should move in order to get to the next closest piece of spam without ending the game.
- To be modified (1/11/24)