Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Gamepad N5110
BlockheadEngine Class Reference
BlockheadEngine Class. More...
#include <BlockheadEngine.h>
Public Member Functions | |
BlockheadEngine () | |
Constructor. | |
~BlockheadEngine () | |
Deconstructor. | |
void | init () |
Initialises variables in blockhead class and level class and _pos struct. | |
void | continue_init () |
Intialises variables in blockhead class and level class and _pos struck (except level number which it keeps the same) | |
int | playgame (N5110 &lcd, Gamepad &pad) |
runs the game 'blockhead' | |
int | highscore () |
sets highscore if new highest level reached |
Detailed Description
BlockheadEngine Class.
Class for running the game
- Date:
- 9 May 2019
Definition at line 16 of file BlockheadEngine.h.
Constructor & Destructor Documentation
BlockheadEngine | ( | ) |
Constructor.
Definition at line 7 of file BlockheadEngine.cpp.
~BlockheadEngine | ( | ) |
Deconstructor.
Definition at line 12 of file BlockheadEngine.cpp.
Member Function Documentation
void continue_init | ( | ) |
Intialises variables in blockhead class and level class and _pos struck (except level number which it keeps the same)
Definition at line 29 of file BlockheadEngine.cpp.
int highscore | ( | ) |
sets highscore if new highest level reached
- Returns:
- _highscore (int)
Definition at line 55 of file BlockheadEngine.cpp.
void init | ( | ) |
Initialises variables in blockhead class and level class and _pos struct.
Definition at line 19 of file BlockheadEngine.cpp.
int playgame | ( | N5110 & | lcd, |
Gamepad & | pad | ||
) |
runs the game 'blockhead'
- Parameters:
-
N5110 class which controlls lcd screen Gamepad class for working with the gamepad
- Returns:
- _gameover (0 when blockhead alive, 1 once died) (int)
Definition at line 39 of file BlockheadEngine.cpp.
Generated on Fri Jul 15 2022 00:42:15 by
