The Pacman Project: Game play

As a class, we came up with a collection of game play elements:

The assignment

In addition to the user interface and motion control from your last assignment, please use complex data structures, animation, and object constructors to add game play elements to the program.


  1. Your game play code must be inside your object constructor. Use object-oriented programming.
  2. Each method should be either:
    • initialization
    • input
    • processing
    • or output
    Don't mix these together in the same method. It makes troubleshooting tougher and decreases portability.
  3. You will need to create your mazeObject, Ms. Pacman, player two (if any), and ghost objects (if any) globally so they can be seen by all your functions.
  4. Have I mentioned lately that console.log() commands help you debug your code a lot? Just sayin'.

Saving your work

Please save your work as "Pacman-Gameplay-LastName.html".

Evaluation (out of 10)