Class

class Players


A variable to hold the Players() object, which organises a list of Player() data objects, a dynamic list of participating players, a dynamic list of active players, the active dealer and the focus player.

Players Variables

VariableTable

VariableData TypeDescriptionValidation
_playersList<Player>Available only within Players, stores a list of Player objects that is interacted with using helper functions.The only changes that can occur to this variable are managed by validated helper functions within Players, to ensure that only the correct data type is given.
participatingIDsList<Int>Stores a list of existing players that are not sitting out.This uses derivedStateOf { } to calculate the value whenever dependent variables change. Therefore this variable only ever changes when one of the variables it’s dependent on, changes.
activeIDsList<Int>Stores a list of existing players that are not sitting out, have folded or have gone all in.This uses derivedStateOf { } to calculate the value whenever dependent variables change. Therefore this variable only ever changes when one of the variables it’s dependent on, changes.
highestBetState<Int>Stores the highest bet amount of any player in _players.This uses derivedStateOf { } to calculate the value whenever dependent variables change. Therefore this variable only ever changes when one of the variables it’s dependent on, changes.
_focusIDMutableIntStateAvailable only within Players, stores the playerID of the current focus player.The only changes that can occur to this variable are managed by validated helper functions within Players, to ensure that only the correct data type is given.
focusIDIntObserves the state of _focusID, mirroring its current value.This variable cannot be reassigned and only changes when _focusID changes, which can only be changed by validated helper functions within Players.
focusPlayerPlayerStores the Player object of the current focus player.This uses derivedStateOf { } to calculate the value whenever dependent variables change. Therefore this variable only ever changes when one of the variables it’s dependent on, changes.
_dealerIDMutableIntStateAvailable only within Players, stores the playerID of the current dealer player.The only changes that can occur to this variable are managed by validated helper functions within Players, to ensure that only the correct data type is given.
dealerIDIntObserves the state of _dealerID, mirroring its current value.This variable cannot be reassigned and only changes when _dealerID changes, which can only be changed by validated helper functions within Players.
dealerPlayerPlayerStores the Player object of the current dealer player.This uses derivedStateOf { } to calculate the value whenever dependent variables change. Therefore this variable only ever changes when one of the variables it’s dependent on, changes.
smallBlindPlayerIDIntObserves the state of _smallBlindPlayerID, mirroring its current value.This variable cannot be reassigned and only changes when _smallBlindPlayerID changes, which can only be changed by validated helper functions within Players.
smallBlindPlayerPlayerStores the Player object of the current small blind player.This uses derivedStateOf { } to calculate the value whenever dependent variables change. Therefore this variable only ever changes when one of the variables it’s dependent on, changes.
bigBlindPlayerIDIntObserves the state of _bigBlindPlayerID, mirroring its current value.This variable cannot be reassigned and only changes when _bigBlindPlayerID changes, which can only be changed by validated helper functions within Players.
bigBlindPlayerPlayerStores the Player object of the current big blind player.This uses derivedStateOf { } to calculate the value whenever dependent variables change. Therefore this variable only ever changes when one of the variables it’s dependent on, changes.