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

Public Slots

void initUI ()
 game2scene::initUI() More...
 
void initDrawPile ()
 game2scene::initDrawPile() More...
 
void initDiscardPile ()
 game2scene::initDiscardPile() More...
 
void initAllCards ()
 game2scene::initAllCards() More...
 
void goLeftMove ()
 game2scene::goLeftMove() More...
 
void goLeftMoveAdv ()
 game2scene::goLeftMoveAdv() More...
 
void goRightMove ()
 game2scene::goRightMove() More...
 
void goRightMoveAdv ()
 game2scene::goRightMoveAdv() More...
 
void checkTwoCards_startPlayer ()
 game2scene::checkTwoCards_startPlayer() More...
 
void getTwoCards_checkPhase1 ()
 game2scene::getTwoCards_checkPhase1() More...
 
void getTwoCards_checkPhase2 ()
 game2scene::getTwoCards_checkPhase2() More...
 
void getTwoCards_checkPhase3 ()
 game2scene::getTwoCards_checkPhase3() More...
 
void checkOneCards_startPlayer ()
 game2scene::checkOneCards_startPlayer() More...
 
void getOneCards_checkPhase1 ()
 game2scene::checkOneCards_checkPhase1() More...
 
void getOneCards_checkPhase2 ()
 game2scene::getOneCards_checkPhase2() More...
 
void swapCard_withenemy_phase1 ()
 game2scene::swapCard_withenemy_phase1() More...
 
void swapCard_withenemy_phase2 ()
 game2scene::swapCard_withenemy_phase2() More...
 
void swapCard_withenemy_phase3 ()
 game2scene::swapCard_withenemy_phase3() More...
 
void spyCard_withenemy_phase1 ()
 game2scene::spyCard_withenemy_phase1() More...
 
void spyCard_withenemy_phase2 ()
 game2scene::spyCard_withenemy_phase2() More...
 
void spyCard_withenemy_phase3 ()
 game2scene::spyCard_withenemy_phase3() More...
 
void checkFinalCabo ()
 game2scene::checkFinalCabo() More...
 
void selectPile ()
 game2scene::selectPile() More...
 
void caboCall ()
 game2scene::caboCall() More...
 
void discardAction ()
 game2scene::discardAction() More...
 
void selectandswap_discard ()
 game2scene::selectandswap_discard() More...
 
void drawAction ()
 game2scene::drawAction() More...
 
void discardcard_action ()
 game2scene::discardcard_action() More...
 
void keepcard_action ()
 game2scene::keepcard_action() More...
 
void keepcard_action_phase1 ()
 game2scene::keepcard_action_phase1() More...
 
void checkDrawPile_amount ()
 game2scene::checkDrawPile_amount() More...
 
void checkDrawPile_amount_CPUs ()
 game2scene::checkDrawPile_amount_CPUs() More...
 
void gameLoop_main ()
 game2scene::gameLoop_main() More...
 
void cpuTurn ()
 game2scene::cpuTurn() More...
 
void cpuActions_1 ()
 game2scene::cpuActions_1() More...
 
void cpuActions_2 ()
 game2scene::cpuActions_2() More...
 
void startCPUGame ()
 game2scene::startCPUGame() More...
 
void exitgame_n_save ()
 game2scene::startCPUGame() More...
 
void endgame_exit ()
 game2scene::endgame_exit() More...
 
void load_game ()
 game2scene::load_game() More...
 

Public Member Functions

 game2scene (QObject *parent=0)
 

Public Attributes

CPUCPU1
 First CPU opponent.
 
CPUCPU2
 Second CPU opponent.
 
cardplayerCard1
 Player card.
 
cardplayerCard2
 Player card.
 
cardplayerCard3
 Player card.
 
cardplayerCard4
 Player card.
 
cardCPU1Card1
 CPU1 card.
 
cardCPU1Card2
 CPU1 card.
 
cardCPU1Card3
 CPU1 card.
 
cardCPU1Card4
 CPU1 card.
 
cardCPU2Card1
 CPU2 card.
 
cardCPU2Card2
 CPU2 card.
 
cardCPU2Card3
 CPU2 card.
 
cardCPU2Card4
 CPU2 card.
 
carddrawPileCard
 Draw pile.
 
carddiscardPileCard
 Discard pile.
 
cardtempPlayerDisplay
 Temporary card to display whenever the player picks from the draw pile and needs to make a choice.
 
QGraphicsPixmapItem * cross
 Cross symbol used to let the user select cards.
 
QGraphicsPixmapItem * crossTemp
 Second cross symbol used to let the user select cards.
 
QGraphicsTextItem * text
 Text element in GUI.
 
QGraphicsTextItem * drawpiletext
 Text element in GUI.
 
QGraphicsTextItem * discardpiletext
 Text element in GUI.
 
QGraphicsTextItem * opp1
 Text element in GUI.
 
QGraphicsTextItem * opp2
 Text element in GUI.
 
QGraphicsPixmapItem * discardPile
 Text element in GUI.
 
QGraphicsPixmapItem * drawPile
 Text element in GUI.
 
QPushButton * goLeft
 Go right.
 
QPushButton * goRight
 Go left.
 
QPushButton * takeDiscard
 Take from discard pile.
 
QPushButton * takeDraw
 Take from draw pile.
 
QPushButton * keep
 Keep card picked from draw pile.
 
QPushButton * discard
 do not keep picked card from draw pile
 
QPushButton * select
 Select button.
 
QPushButton * callCabo
 Call Cabo and end game.
 
QPushButton * exitButton
 Call Cabo and end game.
 
int * cardSelection
 Integer helps with navigation when selecting cards.
 
int * cardSelectionAdversary
 Integer helps with navigation when selecting cards.
 
int * firstSelection
 
int * caboCaller
 Integer helping check who called cabo.
 
int * turnsPassed
 Check how much turns have passed.
 
bool * firstTurn
 Check if the game just started.
 
bool * cputurn
 Check if it is the CPU's turn.
 
bool * caboCalled
 Check if cabo has been called.
 
bool * lock
 Temporary lock boolean used to evaluate conditions between functions.
 
int * finalScorePlayer
 Final score of the human player once the game ends.
 
QVector< int > * drawPileCards
 Holds value in the draw pile.
 
QVector< int > * discardPileCards
 Holds value in the discard pile.
 
QString * mystr
 String to display on text.
 

Member Function Documentation

◆ caboCall

void game2scene::caboCall ( )
slot

game2scene::caboCall()

Function called when the player calls cabo

◆ checkDrawPile_amount

void game2scene::checkDrawPile_amount ( )
slot

game2scene::checkDrawPile_amount()

Check if the draw pile has run out

◆ checkDrawPile_amount_CPUs

void game2scene::checkDrawPile_amount_CPUs ( )
slot

game2scene::checkDrawPile_amount_CPUs()

Check if the draw pile has run out without any turn delay

◆ checkFinalCabo

void game2scene::checkFinalCabo ( )
slot

game2scene::checkFinalCabo()

Final cabo check with scores being displayed

◆ checkOneCards_startPlayer

void game2scene::checkOneCards_startPlayer ( )
slot

game2scene::checkOneCards_startPlayer()

Let the player check one of his cards (Phase1)

◆ checkTwoCards_startPlayer

void game2scene::checkTwoCards_startPlayer ( )
slot

game2scene::checkTwoCards_startPlayer()

Let the player check two of his cards (Phase1)

◆ cpuActions_1

void game2scene::cpuActions_1 ( )
slot

game2scene::cpuActions_1()

CPU1 turn function

◆ cpuActions_2

void game2scene::cpuActions_2 ( )
slot

game2scene::cpuActions_2()

CPU2 turn function

◆ cpuTurn

void game2scene::cpuTurn ( )
slot

game2scene::cpuTurn()

Handle CPU1 and CPU2 turn

◆ discardAction

void game2scene::discardAction ( )
slot

game2scene::discardAction()

Function called when the player picks a card from the discard pile

◆ discardcard_action

void game2scene::discardcard_action ( )
slot

game2scene::discardcard_action()

Function called when the player picks a card from the draw pile and discards it

◆ drawAction

void game2scene::drawAction ( )
slot

game2scene::drawAction()

Function called when the player picks a card from the draw pile

◆ endgame_exit

void game2scene::endgame_exit ( )
slot

game2scene::endgame_exit()

Exit state when cabo has been called

◆ exitgame_n_save

void game2scene::exitgame_n_save ( )
slot

game2scene::startCPUGame()

Exit from in-progress game and save

◆ gameLoop_main

void game2scene::gameLoop_main ( )
slot

◆ getOneCards_checkPhase1

void game2scene::getOneCards_checkPhase1 ( )
slot

game2scene::checkOneCards_checkPhase1()

Let the player check one of his cards (Phase2)

◆ getOneCards_checkPhase2

void game2scene::getOneCards_checkPhase2 ( )
slot

game2scene::getOneCards_checkPhase2()

Let the player check one of his cards (Phase2)

◆ getTwoCards_checkPhase1

void game2scene::getTwoCards_checkPhase1 ( )
slot

game2scene::getTwoCards_checkPhase1()

Let the player check two of his cards (Phase2)

◆ getTwoCards_checkPhase2

void game2scene::getTwoCards_checkPhase2 ( )
slot

game2scene::getTwoCards_checkPhase2()

Let the player check two of his cards (Phase3)

◆ getTwoCards_checkPhase3

void game2scene::getTwoCards_checkPhase3 ( )
slot

game2scene::getTwoCards_checkPhase3()

Let the player check two of his cards (Phase4)

◆ goLeftMove

void game2scene::goLeftMove ( )
slot

game2scene::goLeftMove()

Move left when selecting between player cards

◆ goLeftMoveAdv

void game2scene::goLeftMoveAdv ( )
slot

game2scene::goLeftMoveAdv()

Move left when selecting between adversary cards

◆ goRightMove

void game2scene::goRightMove ( )
slot

game2scene::goRightMove()

Move right when selecting between player cards

◆ goRightMoveAdv

void game2scene::goRightMoveAdv ( )
slot

game2scene::goRightMoveAdv()

Move right when selecting between adversary cards

◆ initAllCards

void game2scene::initAllCards ( )
slot

game2scene::initAllCards()

Initialize all cards on the game scene

◆ initDiscardPile

void game2scene::initDiscardPile ( )
slot

game2scene::initDiscardPile()

Initialize the discard pile

◆ initDrawPile

void game2scene::initDrawPile ( )
slot

game2scene::initDrawPile()

Initialize the draw pile

◆ initUI

void game2scene::initUI ( )
slot

game2scene::initUI()

Initialize the UI elements

◆ keepcard_action

void game2scene::keepcard_action ( )
slot

game2scene::keepcard_action()

Keep card selected from draw pile

◆ keepcard_action_phase1

void game2scene::keepcard_action_phase1 ( )
slot

game2scene::keepcard_action_phase1()

Keep card selected from draw pile

◆ load_game

void game2scene::load_game ( )
slot

game2scene::load_game()

Load existing game

◆ selectandswap_discard

void game2scene::selectandswap_discard ( )
slot

game2scene::selectandswap_discard()

Function called when the player picks a card from the discard pile

◆ selectPile

void game2scene::selectPile ( )
slot

game2scene::selectPile()

Let the user select between the discard and draw pile

◆ spyCard_withenemy_phase1

void game2scene::spyCard_withenemy_phase1 ( )
slot

game2scene::spyCard_withenemy_phase1()

Let the player spy on the card of an opponent (Phase1)

◆ spyCard_withenemy_phase2

void game2scene::spyCard_withenemy_phase2 ( )
slot

game2scene::spyCard_withenemy_phase2()

Let the player spy on the card of an opponent (Phase2)

◆ spyCard_withenemy_phase3

void game2scene::spyCard_withenemy_phase3 ( )
slot

game2scene::spyCard_withenemy_phase3()

Let the player spy on the card of an opponent (Phase3)

◆ startCPUGame

void game2scene::startCPUGame ( )
slot

◆ swapCard_withenemy_phase1

void game2scene::swapCard_withenemy_phase1 ( )
slot

game2scene::swapCard_withenemy_phase1()

Let the player swap one of his cards with an opponent (Phase1)

◆ swapCard_withenemy_phase2

void game2scene::swapCard_withenemy_phase2 ( )
slot

game2scene::swapCard_withenemy_phase2()

Let the player swap one of his cards with an opponent (Phase2)

◆ swapCard_withenemy_phase3

void game2scene::swapCard_withenemy_phase3 ( )
slot

game2scene::swapCard_withenemy_phase3()

Let the player swap one of his cards with an opponent (Phase3)


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