Simple Poker Template 0.0.1
Loading...
Searching...
No Matches
SimplePoker.Logic.Human Class Reference

Class representing a human player in the poker game, managing UI elements and interactions specific to user. More...

Inheritance diagram for SimplePoker.Logic.Human:
SimplePoker.Logic.PlayerBase

Public Member Functions

override void Awake ()
 Initializes the player's data and UI elements upon awakening, including event listeners and button functionalities.
 
void SetData (PlayerData playerData)
 Sets the player's data and invokes the corresponding event when the player is activated.
 
void DisableInterface ()
 Disables the interface associated with the human player.
 
override void DoTurn (GameManager.TurnPoker turn)
 Initiates the player's turn in the game, handling UI elements based on game conditions.
 
- Public Member Functions inherited from SimplePoker.Logic.PlayerBase
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.
 

Properties

PlayerData PlayerData [get]
 
- Properties inherited from SimplePoker.Logic.PlayerBase
int PositionIndex [get]
 
bool IsPlayer [get]
 
List< CardCards [get]
 
PokerHand PokerHand [get]
 
PokerChip PokerChip [get]
 
int Chips [get]
 
int CurrentBet [get]
 
bool IsCheck [get]
 
bool IsCall [get]
 
bool IsRaise [get]
 
bool IsAllIn [get]
 
bool IsFold [get]
 
bool ContinueAllInNextTurn [get, set]
 
bool ContinueFoldNextTurn [get]
 
PokerAction PokerAction [get]
 

Additional Inherited Members

- Public Attributes inherited from SimplePoker.Logic.PlayerBase
Action< PokerActionOnActionChoosed
 
Action< Card, List< Card > > OnCardAddedToHand
 
Action< PokerHandOnHandUpdated
 
Action< int, int > OnChipsAmountChanged
 
Action OnWinnerChoosen
 
Action< int > OnBetMaked
 
Action< PokerChipOnPokerChipSeted
 
Action OnPlayerActived
 
string Name
 
- Protected Member Functions inherited from SimplePoker.Logic.PlayerBase
IEnumerator CallNextPlayerCoroutine (float duration)
 Coroutine to delay the next player's turn.
 
- Protected Attributes inherited from SimplePoker.Logic.PlayerBase
bool IsMyTurn
 
PokerGameAssetData asset
 
GameManager gameManager
 

Detailed Description

Class representing a human player in the poker game, managing UI elements and interactions specific to user.

Member Function Documentation

◆ Awake()

override void SimplePoker.Logic.Human.Awake ( )
virtual

Initializes the player's data and UI elements upon awakening, including event listeners and button functionalities.

Reimplemented from SimplePoker.Logic.PlayerBase.

◆ DisableInterface()

void SimplePoker.Logic.Human.DisableInterface ( )

Disables the interface associated with the human player.

◆ DoTurn()

override void SimplePoker.Logic.Human.DoTurn ( GameManager::TurnPoker turn)
virtual

Initiates the player's turn in the game, handling UI elements based on game conditions.

Parameters
turnThe current turn in the game.

Reimplemented from SimplePoker.Logic.PlayerBase.

◆ SetData()

void SimplePoker.Logic.Human.SetData ( PlayerData playerData)

Sets the player's data and invokes the corresponding event when the player is activated.

Parameters
playerDataThe data of the player.

Property Documentation

◆ PlayerData

PlayerData SimplePoker.Logic.Human.PlayerData
get

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