Educational Game Platform
Public Member Functions | Public Attributes | List of all members
CPU Class Reference

Public Member Functions

 CPU ()
 Default constructor (not used) More...
 
int callCabo (int rounds)
 CPU::callCabo. More...
 
int discard (int cardValue)
 CPU::discard. More...
 
int draw (int cardValue)
 CPU::draw. More...
 

Public Attributes

int * CPUdataArray
 
int * temp1
 Temporary value used between functions.
 
int * temp2
 Temporary value used between functions.
 

Constructor & Destructor Documentation

◆ CPU()

CPU::CPU ( )

Default constructor (not used)

CPU::CPU.

CPU class constructor

Member Function Documentation

◆ callCabo()

int CPU::callCabo ( int  rounds)

CPU::callCabo.

Parameters
roundsfirst argument, give the amount of rounds who passed for the function to decide an output
Returns
Returns an integer that says whether the CPU wants to call CABO or not (0: do not call cabo, 1: call cabo)

Check if the CPU should call CABO

◆ discard()

int CPU::discard ( int  cardValue)

CPU::discard.

Parameters
cardValuefirst argument, give card value
Returns
Returns an integer that says whether the CPU wants to select a card from the discard pile or not (0: do not select card from discard pile, or else 1-2-3-4 select a card and replace at a specific position)

Check if CPU should pick a card from the discard pile

◆ draw()

int CPU::draw ( int  cardValue)

CPU::draw.

Parameters
cardValuefirst argument, give card value
Returns
Returns an integer that says whether the CPU wants to select a card from the draw or not, and also handle any special card picked (0: put picked card to discard pile, or else 1-2-3-4 select a card and replace at a specific position, or else 5-6-7 handle special action)

Check if CPU should pick a card from the draw pile, and handle any special action


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