Base class representing a player in the poker game, handling actions, bets, and interactions with the game environment.
More...
|
| virtual void | Awake () |
| | Initializes the player's setup and subscribes to relevant game events.
|
| |
| void | ClearHand () |
| | Clears the player's hand, removing the cards.
|
| |
| void | AddCardToHand (Card newCard) |
| | Adds a card to the player's hand and invokes corresponding events.
|
| |
| void | UpdatePokerHand (List< Card > cardsInTable) |
| | Updates the player's poker hand based on the cards on the table and invokes the corresponding event.
|
| |
| void | SetChips (int chips) |
| | Sets the player's chip count.
|
| |
| void | AddChips (int chips) |
| | Adds chips to the player's chip count.
|
| |
| void | SetDealer () |
| | Sets the player as the dealer.
|
| |
| void | SetSmallBlind (int chips) |
| | Sets the player as the small blind and makes a initial bet.
|
| |
| void | SetBigBlind (int chips) |
| | Sets the player as the big blind and makes a initial bet.
|
| |
| virtual void | ResetSetup () |
| | Resets the player's setup by clearing their hand and resetting the current bet to zero.
|
| |
| void | ResetActions () |
| | Resets all player actions to their default state.
|
| |
| void | DoFold () |
| | Player executes the fold action.
|
| |
| void | DoCheckOrCall () |
| | Player executes the check or call action.
|
| |
| void | DoCheck () |
| | Player executes the check action.
|
| |
| void | DoCall () |
| | Player execute the call action.
|
| |
| void | DoRaise () |
| | Executes the raise action for the player with a default raise amount.
|
| |
| void | DoRaise (int raiseChips) |
| | Executes the raise action for the player with a specified raise amount.
|
| |
| void | DoAllIn () |
| | Player executes the all-in action.
|
| |
| bool | DidAnAction () |
| | Checks if the player has performed any action.
|
| |
| virtual void | Setup (int positionIndex) |
| | Initializes the player's position index in the game.
|
| |
| virtual void | DoTurn (GameManager.TurnPoker turn) |
| | Initiates the player's turn in the game, handling scenarios where the player is required to perform specific actions.
|
| |
Base class representing a player in the poker game, handling actions, bets, and interactions with the game environment.
◆ AddCardToHand()
| void SimplePoker.Logic.PlayerBase.AddCardToHand |
( |
Card | newCard | ) |
|
Adds a card to the player's hand and invokes corresponding events.
◆ AddChips()
| void SimplePoker.Logic.PlayerBase.AddChips |
( |
int | chips | ) |
|
Adds chips to the player's chip count.
◆ Awake()
| virtual void SimplePoker.Logic.PlayerBase.Awake |
( |
| ) |
|
|
virtual |
◆ CallNextPlayerCoroutine()
| IEnumerator SimplePoker.Logic.PlayerBase.CallNextPlayerCoroutine |
( |
float | duration | ) |
|
|
protected |
Coroutine to delay the next player's turn.
- Parameters
-
| duration | The duration to wait before advancing to the next player. |
◆ ClearHand()
| void SimplePoker.Logic.PlayerBase.ClearHand |
( |
| ) |
|
Clears the player's hand, removing the cards.
◆ DidAnAction()
| bool SimplePoker.Logic.PlayerBase.DidAnAction |
( |
| ) |
|
Checks if the player has performed any action.
- Returns
- True if the player has performed an action, otherwise false.
◆ DoAllIn()
| void SimplePoker.Logic.PlayerBase.DoAllIn |
( |
| ) |
|
Player executes the all-in action.
◆ DoCall()
| void SimplePoker.Logic.PlayerBase.DoCall |
( |
| ) |
|
Player execute the call action.
◆ DoCheck()
| void SimplePoker.Logic.PlayerBase.DoCheck |
( |
| ) |
|
Player executes the check action.
◆ DoCheckOrCall()
| void SimplePoker.Logic.PlayerBase.DoCheckOrCall |
( |
| ) |
|
Player executes the check or call action.
◆ DoFold()
| void SimplePoker.Logic.PlayerBase.DoFold |
( |
| ) |
|
Player executes the fold action.
◆ DoRaise() [1/2]
| void SimplePoker.Logic.PlayerBase.DoRaise |
( |
| ) |
|
Executes the raise action for the player with a default raise amount.
◆ DoRaise() [2/2]
| void SimplePoker.Logic.PlayerBase.DoRaise |
( |
int | raiseChips | ) |
|
Executes the raise action for the player with a specified raise amount.
◆ DoTurn()
Initiates the player's turn in the game, handling scenarios where the player is required to perform specific actions.
- Parameters
-
| turn | The current turn in the game. |
Reimplemented in SimplePoker.Logic.Cpu, and SimplePoker.Logic.Human.
◆ ResetActions()
| void SimplePoker.Logic.PlayerBase.ResetActions |
( |
| ) |
|
Resets all player actions to their default state.
◆ ResetSetup()
| virtual void SimplePoker.Logic.PlayerBase.ResetSetup |
( |
| ) |
|
|
virtual |
Resets the player's setup by clearing their hand and resetting the current bet to zero.
◆ SetBigBlind()
| void SimplePoker.Logic.PlayerBase.SetBigBlind |
( |
int | chips | ) |
|
Sets the player as the big blind and makes a initial bet.
◆ SetChips()
| void SimplePoker.Logic.PlayerBase.SetChips |
( |
int | chips | ) |
|
Sets the player's chip count.
◆ SetDealer()
| void SimplePoker.Logic.PlayerBase.SetDealer |
( |
| ) |
|
Sets the player as the dealer.
◆ SetSmallBlind()
| void SimplePoker.Logic.PlayerBase.SetSmallBlind |
( |
int | chips | ) |
|
Sets the player as the small blind and makes a initial bet.
◆ Setup()
| virtual void SimplePoker.Logic.PlayerBase.Setup |
( |
int | positionIndex | ) |
|
|
virtual |
Initializes the player's position index in the game.
- Parameters
-
| positionIndex | The position index of the player to enable on the table. |
◆ UpdatePokerHand()
| void SimplePoker.Logic.PlayerBase.UpdatePokerHand |
( |
List< Card > | cardsInTable | ) |
|
Updates the player's poker hand based on the cards on the table and invokes the corresponding event.
- Parameters
-
| cardsInTable | The cards currently on the table. |
◆ asset
◆ gameManager
◆ IsMyTurn
| bool SimplePoker.Logic.PlayerBase.IsMyTurn |
|
protected |
◆ Name
| string SimplePoker.Logic.PlayerBase.Name |
◆ OnActionChoosed
| Action<PokerAction> SimplePoker.Logic.PlayerBase.OnActionChoosed |
◆ OnBetMaked
| Action<int> SimplePoker.Logic.PlayerBase.OnBetMaked |
◆ OnCardAddedToHand
| Action<Card, List<Card> > SimplePoker.Logic.PlayerBase.OnCardAddedToHand |
◆ OnChipsAmountChanged
| Action<int, int> SimplePoker.Logic.PlayerBase.OnChipsAmountChanged |
◆ OnHandUpdated
| Action<PokerHand> SimplePoker.Logic.PlayerBase.OnHandUpdated |
◆ OnPlayerActived
| Action SimplePoker.Logic.PlayerBase.OnPlayerActived |
◆ OnPokerChipSeted
| Action<PokerChip> SimplePoker.Logic.PlayerBase.OnPokerChipSeted |
◆ OnWinnerChoosen
| Action SimplePoker.Logic.PlayerBase.OnWinnerChoosen |
◆ Cards
| List<Card> SimplePoker.Logic.PlayerBase.Cards |
|
get |
◆ Chips
| int SimplePoker.Logic.PlayerBase.Chips |
|
get |
◆ ContinueAllInNextTurn
| bool SimplePoker.Logic.PlayerBase.ContinueAllInNextTurn |
|
getset |
◆ ContinueFoldNextTurn
| bool SimplePoker.Logic.PlayerBase.ContinueFoldNextTurn |
|
get |
◆ CurrentBet
| int SimplePoker.Logic.PlayerBase.CurrentBet |
|
get |
◆ IsAllIn
| bool SimplePoker.Logic.PlayerBase.IsAllIn |
|
get |
◆ IsCall
| bool SimplePoker.Logic.PlayerBase.IsCall |
|
get |
◆ IsCheck
| bool SimplePoker.Logic.PlayerBase.IsCheck |
|
get |
◆ IsFold
| bool SimplePoker.Logic.PlayerBase.IsFold |
|
get |
◆ IsPlayer
| bool SimplePoker.Logic.PlayerBase.IsPlayer |
|
get |
◆ IsRaise
| bool SimplePoker.Logic.PlayerBase.IsRaise |
|
get |
◆ PokerAction
◆ PokerChip
| PokerChip SimplePoker.Logic.PlayerBase.PokerChip |
|
get |
◆ PokerHand
| PokerHand SimplePoker.Logic.PlayerBase.PokerHand |
|
get |
◆ PositionIndex
| int SimplePoker.Logic.PlayerBase.PositionIndex |
|
get |
The documentation for this class was generated from the following file:
- C:/Users/USER/Documents/Github/Poker Offline AssetStore/Assets/Simple Poker Template/Scripts/Game Scene/Characters/PlayerBase.cs