Skip to main content Link Search Menu Expand Document (external link)

Theme: auto

Grading and Taking it Further

Grading Specifications

To receive a grade of B, you must have the following:

  1. At the start of the game, all four ghosts start in the Scatter state, move towards their respective corners, and will circle around the node if they still are in Scatter.
  2. When entering the Frightened state, ghosts reverse their direction of travel, and when reaching an intersection will select a random valid target node. If the ghost is killed, it transitions to the Dead state. Otherwise, it returns to Scatter after 7 seconds.
  3. In the Dead state, ghosts path back to the pen, after which they transition to Scatter.
  4. After 5 seconds in Scatter, the ghosts transition to Chase. In the Chase state, each of the four ghosts have their unique targets correctly implemented. After 20 seconds in Chase, the ghosts return to the Scatter state.
  5. Ghosts never reverse direction (except when Frightened), never stop moving, and never path out of bounds.
  6. The animations update properly, based on the state and the direction the ghost is facing.
  7. AudioSystem functions are implemented and pass the unit tests. All sounds play correctly.

Keep in mind that for an A, you will also want to check for warnings on your GitHub actions, and make sure you are writing good quality code. We will do a code review and let you know what changes we think you should make, and you will have an opportunity to apply those changes to improve your grade during the regrade period.

Since there is an odd number of spec items (7), you have to implement at least 4 to get a C.

Taking it Further!! (Optional)

Here are some ideas on things you could add to this lab. As a reminder, doing this will have no impact on your lab grade. You do not need to implement any of these to get an A. Similarly, you could implement these and not get an A if you have other issues! Adding anything extra is purely “for fun” and for your own personal education and enjoyment.

  • Make it so if you clear all the pellets in the maze, it resets the game and the ghosts now move faster. You could also make it so that when it resets, the scatter duration decreases (so they spend more time in chase).
  • Calculate and display a score (you can read about the Pac-Man scoring system here).
  • Make fruit spawn periodically. We’ve included Cherry.png and Strawberry.png for fruits.