Terminal based game, heavily inspired by Jetpack Joyride
Contained in requirements.txt
To install enter the command:
pip install -r requirements.txt
In the terminal, run
python game.py
- w : Move player up
- a : Move player left
- d : Move player right
- b : Shoot bullet
- spacebar : Activate shield
- l : Activate dragon
- q : Quit the game
-
Inheritance:
There is a class GameObject from which all the other classes except Board inherit. -
Polymorphism:
The class Mandalorian and other classes like Bullet have different methods like hit_right_edge which are called from the same place but do different things.
In Mandalorian we stop the object from moving but in Bullet we deactivate the bullet. -
Encapsulation:
We have wrapped data and methods in one unit. -
Abstraction:
We are calling methods to manipulate the hidden data of objects such as move_up in Mandalorian.