Mbed project for a FRDM-K64F microcontroller. Game made out of five sub-games including flappy birds, snake, stack, trivia and space invaders.

Dependencies:   mbed

Fork of The_Children_of_Cronos_el15mggr by ELEC2645 (2016/17)

Embed: (wiki syntax)

« Back to documentation index

taurolib Class Reference

taurolib Class Reference

taurolib Class More...

#include <taurolib.h>

Public Member Functions

 taurolib ()
 Constructor.
void intro (N5110 &lcd)
 function for showing how to start game
void draw (N5110 &lcd, Gamepad &pad, DigitalOut &b, DigitalOut &x)
 main draw function that draws the question on the screen and which option is the cursor on(rectangle filled black) it also allows to switch between answer options selecting the desired one
void drawselect (N5110 &lcd)
 fills black the option rectangle selected while the rest of them are transparent filled
void drawquestion (N5110 &lcd)
 draws the appropiate question for each state
void gameover (N5110 &lcd)
 draws the points penalty due to the failed answer
void transition (N5110 &lcd)
 draws the message between levels indicating in which level are you, your score and the subject of the next question
void game (N5110 &lcd, Gamepad &pad, DigitalOut &a, DigitalOut &start, DigitalOut &b, DigitalOut &x)
 assemblies the game
void init ()
 sets initial state values
int score ()

Detailed Description

taurolib Class

Library for the fith game, Tauro Revision 1.3

Author:
Mateo Randulfe
Date:
May 2017

Definition at line 16 of file taurolib.h.


Constructor & Destructor Documentation

taurolib (  )

Constructor.

structure for switching between answer options

Definition at line 7 of file taurolib.cpp.


Member Function Documentation

void draw ( N5110 lcd,
Gamepad pad,
DigitalOut &  b,
DigitalOut &  x 
)

main draw function that draws the question on the screen and which option is the cursor on(rectangle filled black) it also allows to switch between answer options selecting the desired one

Parameters:
pad/b/xswitches between options
lcddraws in the screen

Definition at line 160 of file taurolib.cpp.

void drawquestion ( N5110 lcd )

draws the appropiate question for each state

Parameters:
lcdprint in the screen

Definition at line 36 of file taurolib.cpp.

void drawselect ( N5110 lcd )

fills black the option rectangle selected while the rest of them are transparent filled

Parameters:
lcdprints in the screen

Definition at line 139 of file taurolib.cpp.

void game ( N5110 lcd,
Gamepad pad,
DigitalOut &  a,
DigitalOut &  start,
DigitalOut &  b,
DigitalOut &  x 
)

assemblies the game

Parameters:
pad/b/xanswer selector
startstarts game
aselects answer

Definition at line 443 of file taurolib.cpp.

void gameover ( N5110 lcd )

draws the points penalty due to the failed answer

Parameters:
lcdprints in screen

Definition at line 312 of file taurolib.cpp.

void init (  )

sets initial state values

Definition at line 26 of file taurolib.cpp.

void intro ( N5110 lcd )

function for showing how to start game

Parameters:
lcdneccesary for displaying on the screen

Definition at line 304 of file taurolib.cpp.

int score (  )
Returns:
score

Definition at line 438 of file taurolib.cpp.

void transition ( N5110 lcd )

draws the message between levels indicating in which level are you, your score and the subject of the next question

Parameters:
lcdprints in screen

Definition at line 186 of file taurolib.cpp.