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

Public Slots

void generateBoard ()
 gameScene_1::generateBoard More...
 
void selectLeft ()
 gameScene_1::selectLeft More...
 
void selectRight ()
 gameScene_1::selectRight More...
 
void diceRoll ()
 gameScene_1::diceRoll More...
 
void checkSnakeLadder ()
 
void winCondition ()
 gameScene_1::winCondition More...
 
void movePlayer ()
 gameScene_1::movePlayer More...
 
void movePlayerOpp ()
 gameScene_1::movePlayerOpp More...
 
void backToMenu ()
 gameScene_1::backToMenu More...
 
void loadGame (int posp1, int posp2, bool turn)
 gameScene_1::loadGame More...
 

Public Member Functions

 gameScene_1 (QObject *parent=0)
 

Public Attributes

QGraphicsTextItem * text
 Text element in GUI.
 
QGraphicsTextItem * text2
 Text element in GUI.
 
QGraphicsTextItem * text3
 Text element in GUI.
 
QPushButton * rolldice
 Button associated to rolling the dices.
 
QPushButton * pickdice1
 Button associated to pick a dice.
 
QPushButton * pickdice2
 Button associated to pick a dice.
 
QPushButton * backtomenu
 Button associated to going back to menu.
 
gameScene_1_playerplayer1
 Player 1 entity.
 
gameScene_1_playerplayer2
 Player 2 entity.
 
gameScene_1_dicedice1
 Dice 1 entity.
 
gameScene_1_dicedice2
 Dice 2 entity.
 
gamescene_1_ladderSnakeladderSnake
 Ladder&Snake entity.
 
QGraphicsRectItem * square
 Boxes used to denote ladder/snakes.
 
int * ladderPos
 Array used to store Ladder start/end positions.
 
int * snakePos
 Array used to store Snake start/end positions.
 
bool * firstRoll
 Bool denoting first roll status.
 
bool * playerTurn
 Bool denoting player turn.
 
bool * sidePick
 Bool denoting left/right dice pick.
 
bool * winState
 Bool denoting win state.
 
bool * winner
 
bool * CPU
 Bool denoting CPU adversary / human adversary.
 

Member Function Documentation

◆ backToMenu

void gameScene_1::backToMenu ( )
slot

gameScene_1::backToMenu

Go back to main menu

◆ diceRoll

void gameScene_1::diceRoll ( )
slot

gameScene_1::diceRoll

Roll dice & implements game loop

◆ generateBoard

void gameScene_1::generateBoard ( )
slot

gameScene_1::generateBoard

Generate board dynamically ( add snakes/ladders) from a text file

◆ loadGame

void gameScene_1::loadGame ( int  posp1,
int  posp2,
bool  turn 
)
slot

gameScene_1::loadGame

Parameters
posp1: player1 position
posp2: player2 position
turn: bool which denotes which player's turn it is

Loads existing game, if there is any

◆ movePlayer

void gameScene_1::movePlayer ( )
slot

gameScene_1::movePlayer

Move player after a dice roll

◆ movePlayerOpp

void gameScene_1::movePlayerOpp ( )
slot

gameScene_1::movePlayerOpp

Move player after a dice roll

◆ selectLeft

void gameScene_1::selectLeft ( )
slot

gameScene_1::selectLeft

This function is executed when the player selects the left dice

◆ selectRight

void gameScene_1::selectRight ( )
slot

gameScene_1::selectRight

This function is executed when the player selects the right dice

◆ winCondition

void gameScene_1::winCondition ( )
slot

gameScene_1::winCondition

Check if the win condition ( player reaches case 100) is satisfied


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