Skip to content

ACS1111-group/PACMan-OOP-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAC-MAN: OOP Game

30-huge-maze-pacman

Info

About PAC Man OOP Game is a python game that incorporate Object-oriented programming principles to create classes to create characters and coins to create a game.
Team Louisa Goncharenko, Andrew Alsing
Goal Develop a robust python game application using an Object Oriented Programming Principles.

File Structure

Pacman/
├── character.py         # Character class: Parent class
├── pacman.py            # Pacman class that inherits from parent
├── ghost.py             # Ghost class that inherits from parent
├── coin.py              # Coin class that is passed into other classes to increase coin levels.
├── main.py              # Main File that runs the game

Diagram of Class Inheritance

Screen Shot 2022-12-05 at 3 43 27 PM

Features

  • Each character (both ghosts and Pacmans) have the ability to move on a grid using (x,y) coordinates
  • Each character has an eat method where if they bummp into one another, the character with the highest coin level eats the other character.
  • Ghosts are given a color attribute and a mood for visual effects.
  • Each character is able to add or lose coins based on class methods.
  • Ghosts have a visibility method that changes there visibility on the board for visual effects.

Learnings

  • created classes
  • used single-class inheritance
  • used a super method to inherit attributes from parent classes
  • generated a random amount of coins for each characters

Improvements for the game

  • Using Pygame library to draw character and the grid
  • Creating buttons to start and pause the game

Releases

No releases published

Packages

No packages published

Languages