Giter Site home page Giter Site logo

jetpack_joyride_terminal's Introduction

1. Rules of the game

1) Game runs for a fixed amount of time which when exceeded makes you lose the game
2) Many coins come on the way which when collected fetches you 5pts
3) Kill enemies or obstacles to gain 2pts
4) You get 3 lives
5) Many Power(ups/downs) like shield , Magnets , Boost come on the way which can be collected
6) In the end is the boss level. The boss shoots snow balls which need to be dodged
7) Ultimate Dragon powerup can be used between the game
8) Boss follows the mandalorian along the vertical axis
9) To kill Boss, it needs to be hit by 10 bullets

2. Description of Main Classes

1) Board : Contains the main 2d numpy grid, timer, description, rules of the game.
2) Game : This is where the main loop of the game runs and all other classes are called.

3. Instructions to play

Run the following command in the directory :	
1) python3 main.py

2) Use the following controls:
	a) w,a,d to move up, move left, move right respectively.
	b) 'space' to use shield
	c) l to shoot bullets
	d) Press Q to quit the game
	e) Press 0 to activate Ultimate Dragon which can be used only once in the entire game

4. Requirements

1) Python3
2) colorama==0.4.3
3) numpy==1.18.1

How the OOPS concepts are used :

1) Inheritance:

As you can see in images ( images/1.png and images/2.png ) the class Enemy is inherited from two classes Person and Parent_Func.
Some variables are kept protected beacause private variables can’t be accessed in an inherited class.

2) Polymorphism :

( images/3.png )
This the class for the bars (obstacles)
According to the value of p given during initialisation of the object of this class ,one of the 4 types of bars ( Vertical , Horizontal , Upper left to Lower right Diagonal , Upper right to Lower left Diagonal ) is made.

3) Encapsulation :

Classes and object are being used and made so encapsulation is done.

4) Abstraction :

( images/4.png )
This is the Mandalorian class.
We can see that functions like move left, move right etc are made to stow away inner details from the end user.

jetpack_joyride_terminal's People

Contributors

doltonfernandes avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.