Educational Game Platform
Public Slots | Public Member Functions | Public Attributes | List of all members
gamescene_1_ladderSnake Class Reference
Inheritance diagram for gamescene_1_ladderSnake:

Public Slots

void initLadder (int seed, int start, int end)
 gamescene_1_ladderSnake::initLadder More...
 
int getXYcase (int caseNum, int xy)
 gamescene_1_ladderSnake::getXYcase More...
 

Public Member Functions

 gamescene_1_ladderSnake (QObject *parent=0)
 

Public Attributes

QPixmap * image
 Image associated to ladder/snake.
 
int * id
 Id associated to ladder/snake.
 
bool * goForward
 Bool associated to movement logic.
 
int * posXstart
 Temp value used in calculations across functions.
 
int * posXend
 Temp value used in calculations across functions.
 
int * posYstart
 Temp value used in calculations across functions.
 
int * posYend
 Temp value used in calculations across functions.
 
int * posXtemp
 Temp value used in calculations across functions.
 
int * posYtemp
 Temp value used in calculations across functions.
 
int * posXtempFunc
 Temp value used in calculations across functions.
 
int * posYtempFunc
 Temp value used in calculations across functions.
 
double * size
 Temp value used in calculations across functions.
 
double * angle
 Temp value used in calculations across functions.
 
double * centerX
 Temp value used in calculations across functions.
 
double * centerY
 Temp value used in calculations across functions.
 
double * tempLength
 Temp value used in calculations across functions.
 

Member Function Documentation

◆ getXYcase

int gamescene_1_ladderSnake::getXYcase ( int  caseNum,
int  xy 
)
slot

gamescene_1_ladderSnake::getXYcase

Parameters
caseNum: value of the case to search
xy: xy=0 return x value , xy=1 return y value
Returns
x coordinate of the case

When assigning a case to a ladder/snake, we search for its coordinates using this function

◆ initLadder

void gamescene_1_ladderSnake::initLadder ( int  seed,
int  start,
int  end 
)
slot

gamescene_1_ladderSnake::initLadder

Parameters
seed: 0-1 are ladder instance seeds, 2-3-4 are snake instance seeds
start: where is the instance start position
end: where is the instance end position

Initialize ladder or snake instance with given parameters


The documentation for this class was generated from the following files: