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

The GameManager class manages the poker game, including player turns, bets, card distribution, and round progression. More...

Inheritance diagram for SimplePoker.Logic.GameManager:
SimplePoker.Singleton< GameManager >

Public Types

enum  TurnPoker {
  Ante = 0 , Flop , Turn , River ,
  Winner
}
 

Public Member Functions

void NextPlayer ()
 Moves the game to the next player's turn and checking if it is necessary to change the round.
 
IEnumerator NextTurnCoroutine ()
 Initiates the next turn in the game, updating game state and managing transitions.
 
void AddChipsToPot (PlayerBase player, int chips)
 Adds chips to the pot made by one of the players.
 
void SetPlayerEndTurn (PlayerBase player)
 Defines the player who will be responsible for finishing the round of the next poker turn.
 
void PlayerFold (PlayerBase player)
 Handles a player's folding action.
 
void PlayerAllIn (PlayerBase player)
 Handles a player going all-in.
 
bool HasBetInTable ()
 Checks if there's a bet in the current round.
 
bool IsJustOneNotAllIn ()
 Checks if there's only one player who hasn't gone all-in yet.
 

Public Attributes

int IncreaseForcedBet = 100
 
int BetBase
 

Protected Member Functions

override void Awake ()
 
- Protected Member Functions inherited from SimplePoker.Singleton< GameManager >
override void Awake ()
 

Properties

Deck Deck [get]
 
TurnPoker Turn [get]
 
int TurnIndex [get]
 
PokerStats PokerStats [get]
 
PokerPotBet PokerPotBet [get]
 

Detailed Description

The GameManager class manages the poker game, including player turns, bets, card distribution, and round progression.

It implements the Singleton pattern to ensure a single global instance is accessible.

Member Enumeration Documentation

◆ TurnPoker

Enumerator
Ante 
Flop 
Turn 
River 
Winner 

Member Function Documentation

◆ AddChipsToPot()

void SimplePoker.Logic.GameManager.AddChipsToPot ( PlayerBase player,
int chips )

Adds chips to the pot made by one of the players.

Parameters
playerThe player who added the chips.
chipsThe number of chips to add to the pot.

◆ Awake()

override void SimplePoker.Logic.GameManager.Awake ( )
protected

◆ HasBetInTable()

bool SimplePoker.Logic.GameManager.HasBetInTable ( )

Checks if there's a bet in the current round.

◆ IsJustOneNotAllIn()

bool SimplePoker.Logic.GameManager.IsJustOneNotAllIn ( )

Checks if there's only one player who hasn't gone all-in yet.

◆ NextPlayer()

void SimplePoker.Logic.GameManager.NextPlayer ( )

Moves the game to the next player's turn and checking if it is necessary to change the round.

◆ NextTurnCoroutine()

IEnumerator SimplePoker.Logic.GameManager.NextTurnCoroutine ( )

Initiates the next turn in the game, updating game state and managing transitions.

◆ PlayerAllIn()

void SimplePoker.Logic.GameManager.PlayerAllIn ( PlayerBase player)

Handles a player going all-in.

Parameters
playerThe player going all-in.

◆ PlayerFold()

void SimplePoker.Logic.GameManager.PlayerFold ( PlayerBase player)

Handles a player's folding action.

Parameters
playerThe player who folds.

◆ SetPlayerEndTurn()

void SimplePoker.Logic.GameManager.SetPlayerEndTurn ( PlayerBase player)

Defines the player who will be responsible for finishing the round of the next poker turn.

Parameters
playerThe player who finished the next turn.

Member Data Documentation

◆ BetBase

int SimplePoker.Logic.GameManager.BetBase

◆ IncreaseForcedBet

int SimplePoker.Logic.GameManager.IncreaseForcedBet = 100

Property Documentation

◆ Deck

Deck SimplePoker.Logic.GameManager.Deck
get

◆ PokerPotBet

PokerPotBet SimplePoker.Logic.GameManager.PokerPotBet
get

◆ PokerStats

PokerStats SimplePoker.Logic.GameManager.PokerStats
get

◆ Turn

TurnPoker SimplePoker.Logic.GameManager.Turn
get

◆ TurnIndex

int SimplePoker.Logic.GameManager.TurnIndex
get

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