Class: Player

Player()

Class Containing all information of a player.

Constructor

new Player()

Source:

Methods

addCard(card)

add the card in the bonus of the player
Parameters:
Name Type Description
card *
Source:

bet(amount)

The player places a bet in the game.
Parameters:
Name Type Description
amount int amount of the bet
Source:

betBonus(amount)

bet the bonus in the Total pot
Parameters:
Name Type Description
amount int
Source:

betinitial(amount)

special case of the bet for the initial blind
Parameters:
Name Type Description
amount int
Source:

call()

Calls the current bet, marking the player as having called for the current round.
Source:

canJoinTable()

check if the player have enough money to join a game
Source:
Returns:
true if player have more than 40SC | false otherwise

check()

Checks the player's hand, marking them as checked for the current round.
Source:

clearHand()

Clears the player's hand by removing all cards.
Source:

fold()

Folds the player's hand, marking them as folded and inactive for the current round.
Source:

gettimeLastAnswer() → {int}

Gets the time of the last answer.
Source:
Returns:
- The time of the last answer.
Type
int

hideCard(cardIndex)

hide the playerCard index
Parameters:
Name Type Description
cardIndex int
Source:

howmanyBetTurn()

Source:
Returns:
how many the player bet in the turn

isPlayerActive() → {boolean}

Checks if the player is currently active.
Source:
Returns:
- True if the player is active, otherwise false.
Type
boolean

jesuislewinner()

put the winner status
Source:

movePlayerToSpectator()

move the player to spectator and reset his status
Source:

newRoundReset()

Resets the player's state for a new round in the game.
Source:

newTurnReset()

Resets the player's state for a new turn.
Source:

playing()

Marks the player as actively playing in the current round.
Source:

raise()

Raises the current bet, marking the player as having raised for the current round.
Source:

resetPlayerBonus()

Resets the player's bonus points to zero and marks them as not ready.
Source:

revealCard(cardIndex)

reveal the player card index
Parameters:
Name Type Description
cardIndex int
Source:

seRemplirLesPoches(total)

Put the pot in my pocket (when he win the game the player get the money)
Parameters:
Name Type Description
total int
Source:

setAfk()

set the Player in AFK
Source:

setTapis()

Set the player allin
Source:

settimeLastAnswer(t)

Sets the time of the last answer.
Parameters:
Name Type Description
t int The time of the last answer.
Source:

statusFor(id)

give all the status of the player
Parameters:
Name Type Description
id id
Source:
Returns:
the info of the player id

tapis(amount)

all in the player
Parameters:
Name Type Description
amount int
Source:

toggleSpectator()

change the player to spectator or unspecator
Source:

unsetAfk()

unset the AFK player
Source:

unsetTapis()

Unset the allin player
Source:

(async) updateMoneyInDatabase(coinsToAdd)

in the name
Parameters:
Name Type Description
coinsToAdd int
Source: