public Context(PlayersImplementation playersImplementation, List <int> PlayersInTheGame, int currentPot, int bigBlindChips) { this.playersImplementation = playersImplementation; this.PlayersInTheGame = new List <int> (); PlayersToGetAction = PlayersInTheGame; this.pot = currentPot; this.bigBlind = bigBlindChips; minimumAmountToCall = 0; currentAction = Context.CurrentAction.checking; finishedEarlier = false; }
public void init(PlayerManager p) { i++; int childCount = transform.GetComponentsInChildren <PlayerManager> ().Count(); if (childCount == i) { gameManager = GameObject.Find("GameManager").GetComponent <GameManager> (); playersImplementations = new PlayersImplementation(this, gameManager, GameManager.bigBlindChips, GameManager.bigBlindChips / 2); } }
public List <int> getTheWinner(PlayersImplementation playersImplementation) { List <int> winners = new List <int> (); winners.Add(playersImplementation.PlayersInTheGame [0]); int result; for (int i = 1; i < playersImplementation.PlayersInTheGame.Count; i++) { result = compareTwoHands (playersImplementation.players [winners [0]], playersImplementation.players [playersImplementation.PlayersInTheGame [i]]); if (result == 0) { winners.Clear(); } if (result != 2) { winners.Add(playersImplementation.PlayersInTheGame [i]); } } return(winners); }
public ChipsManager(PlayersImplementation playersImplementation) { Chips = new Dictionary <string, int> (); this.playersImplementation = playersImplementation; }
public Round(PlayersImplementation playersImplementation, List <int> playerStillInTheGame, int currentPot, int bigBlindChips) { this.playersImplementation = playersImplementation; context = new Context(playersImplementation, playerStillInTheGame, currentPot, bigBlindChips); }