Skip to content
/ Pacman Public

📓Examples of multithreading concepts through a Pacman game example.

License

Notifications You must be signed in to change notification settings

CSC3100/Pacman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Static Badge GitHub repo size GitHub Release License: CC BY-NC 4.0

Pacman

This program demonstrates multithreading concepts using a Pacman game example. A Timer object manages the Maze panel's repaint cycle at 10 frames per second. Both Pacman and the ghost are implemented as runnable threads, allowing their positions to update automatically. Pacman also utilizes key listeners, enabling user interaction to change its direction dynamically.

User Interface


Class Diagram

Notice Runnable, Thread, and Timer. Timer refresh the Maze 10 frames per second while the Pacman and Ghost runnables keep updating their positions.