ELEC2645 (2018/19) / Mbed 2 deprecated el17ntkv

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Badengine Class Reference

Badengine Class Reference

Badengine Class. More...

#include <Badengine.h>

Public Member Functions

 Badengine ()
 Default Badengine object constructor.
 ~Badengine ()
 Default Badengine object destructor.
void init ()
 Mutator method initialises the badengine object by initialising the respective charactersprites,grid,ghost and badman classes used in the game.
void readInput (Gamepad &pad)
 Mutator method records the users interactions with the badman character based on the joystick movement.
void setGhostNumber (int number)
 Mutator method sets the number of ghosts being used at the respective point in time within the game.
void update (Gamepad &pad)
 Mutator method updates the game accordingly depending on the users choice of movement.
void draw (N5110 &lcd)
 Mutator method displays the entire game on the lcd screen.

Detailed Description

Badengine Class.

Author:
Mr Nigel TK Vere, University of Leeds Badengine controls the operation of the game per level using the charactersprites,grid,ghost and badman classes
Date:
April 2019 Badengine Class

Badengine controls the operation of the game per level using the charactersprites,grid,ghost and badman classes

Version:
1.0
Author:
Mr Nigel TK Vere
Date:
April 2019

Definition at line 31 of file Badengine.h.


Constructor & Destructor Documentation

Badengine (  )

Default Badengine object constructor.

Definition at line 4 of file Badengine.cpp.

~Badengine (  )

Default Badengine object destructor.

Definition at line 8 of file Badengine.cpp.


Member Function Documentation

void draw ( N5110 lcd )

Mutator method displays the entire game on the lcd screen.

Parameters:
lcdRefrence NOKIA 5110 LCD screen object

Definition at line 47 of file Badengine.cpp.

void init (  )

Mutator method initialises the badengine object by initialising the respective charactersprites,grid,ghost and badman classes used in the game.

Definition at line 27 of file Badengine.cpp.

void readInput ( Gamepad pad )

Mutator method records the users interactions with the badman character based on the joystick movement.

Definition at line 39 of file Badengine.cpp.

void setGhostNumber ( int  number )

Mutator method sets the number of ghosts being used at the respective point in time within the game.

Parameters:
numberInteger value representing the number of ghosts that will appear within the game

Definition at line 14 of file Badengine.cpp.

void update ( Gamepad pad )

Mutator method updates the game accordingly depending on the users choice of movement.

Parameters:
padRefrence Gamepad object

Definition at line 57 of file Badengine.cpp.