B. Program Description for Developers

Assumptions made or used in software design

  • FEH Proteus is fully functional
  • LCD screen works as expected

List of important variables and their uses

  • map[16][12] – stores the integer states of the entire board, including walls, free space, and characters
  • leaderboard[6] – stores names and scores of all players
  • points – integer number of oranges accumulated
  • paused – boolean state of if the game is paused
  • won – boolean outcome of the game, used for displaying the result to the user
  • ended – boolean state of the game
  • direction – stores an integer direction for changing the coordinates of characters
  • color – color of a character
  • onOrange – boolean state of whether or not a ghost was on top of an orange
  • xPrior, yPrior – prior x and y positions of a character, used to stop randomly returning to prior location
  • x, y – x and y positions of a character

List and description of all functions

  • displayMenu – renders the menu and responds to taps
  • displayPlay – renders the game board and responds to time and touch events
  • displayResults – renders the game results and lets user select
  • displayBoard – renders the leaderboard
  • displayRules – renders the rules and instructions screen
  • displayCredits – renders the credits screen
  • renderMap – renders the entire map with buttons
  • moveGhosts – moves all three ghosts
  • movePacman – moves Pac-Man
  • absV – returns the absolute value of a number
  • Game::openRoute – opens a game route/screen
  • Game::modCoord – modifies a coordinate pair to reflect movement in a direction
  • Game::renderCoord – Renders specific map coordinates
  • Game::checkDirection – Checks if certain direction can be used
  • Game::onlyDirection – Checks if only one direction is the valid

Program performance and limitations

The relatively low processing power of the FEH Proteus caused issues with graphics. More elaborate design features, such as shaping the ghosts into a more ghost-like form, were not feasible due to severe lags in game play.

The C++ code for FEHeck Yeah is set up to handle multiple routes and persist data between the routes. The main function creates an instance of the Game class and opens the menu. The Game class stores game variables and has the ability to open routes. The menu, game play, game session results, leaderboard, instructions and rules, and credits routes are all separate from each other. The menu route renders a menu and listens for touches to trigger going to a new route. The game play route renders a map from a matrix of integers and manages the state of ghosts and pacman over time. It also listens for touches to trigger changing the direction of pacman, pausing or resuming the game, and ending the game. The game session results route displays the game session outcome and lets the user tap the name of the professor or TA to whom they want to donate points. The leaderboard route shows how many points each professor or TA has earned. The instructions and rules route displays all of the instructions and rules for game play and then returns to the main menu. The credits route displays the credits for the game development and then returns to the main menu.