It is a Java implementation of the pac-man game made for the college subject "SCC0604 - Object-Oriented Programming" at the University of São Paulo - USP. The main goal in implementing such project was to apply the four pillars of OOP design: abstraction, encapsulation, inheritance and polymorphism.
The approach used to control the behavior of the ghosts was not equal to the used in the original game. In fact, it was a way simpler. Here, Inky and Clyde just move randomly in the maze while Blinky and Pinky keep chasing the pac-man. To execute the ghosts' movements, each cell of the maze was considered as a node of a graph and the Breadth First Search algorithm was used to find the shortest path between one ghost and the point such ghost intended to reach.
To run the game, it is required to have the Oracle JDK 8 installed on your machine.
Download the file pacman.jar in the root of this repository and then, in your terminal
java -jar pacman.jar
- Adding sound to the game;
- Change the chasing mechanism of the ghosts.



