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

Class representing a CPU player in the poker game, managing AI actions and behavior. More...

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

Public Member Functions

void SetData (CpuData cpuData)
 Sets the data for the CPU player and invokes the player activated event.
 
override void DoTurn (GameManager.TurnPoker turn)
 Initiates the CPU player's turn in the game, handling scenarios where the CPU player is required to perform specific actions.
 
- Public Member Functions inherited from SimplePoker.Logic.PlayerBase
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.
 

Properties

CpuData CpuData [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 CPU player in the poker game, managing AI actions and behavior.

Member Function Documentation

◆ DoTurn()

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

Initiates the CPU player's turn in the game, handling scenarios where the CPU player is required to perform specific actions.

Parameters
turnThe current turn in the game.

Reimplemented from SimplePoker.Logic.PlayerBase.

◆ SetData()

void SimplePoker.Logic.Cpu.SetData ( CpuData cpuData)

Sets the data for the CPU player and invokes the player activated event.

Parameters
cpuDataThe CPU player's data.

Property Documentation

◆ CpuData

CpuData SimplePoker.Logic.Cpu.CpuData
get

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