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
| Variable | Data Type | Description | Validation |
|---|---|---|---|
_players | List<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. |
participatingIDs | List<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. |
activeIDs | List<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. |
highestBet | State<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. |
_focusID | MutableIntState | Available 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. |
focusID | Int | Observes 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. |
focusPlayer | Player | Stores 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. |
_dealerID | MutableIntState | Available 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. |
dealerID | Int | Observes 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. |
dealerPlayer | Player | Stores 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. |
smallBlindPlayerID | Int | Observes 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. |
smallBlindPlayer | Player | Stores 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. |
bigBlindPlayerID | Int | Observes 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. |
bigBlindPlayer | Player | Stores 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. |