private void HandleOnDistributeCardResponseReceived(string sender) { TournamentWinnerPanel.isTournamentWinnersDeclared = false; if (sender.Equals(Constants.TEXASS_SERVER_NAME)) { currentTexassGameRound = TEXASS_GAME_ROUND.PREFLOP; TexassGame.Instance.currentGameStatus = GAME_STATUS.CARD_DISTRIBUTE; if (TexassGame.Instance.gameObject.activeSelf) { StartCoroutine(DistributeTexassGameCards()); } TexassGame.Instance.isGameCompleted = false; } else if (sender.Equals(Constants.WHOOPASS_SERVER_NAME)) { currentWhoopAssGameRound = WHOOPASS_GAME_ROUND.START; WhoopAssGame.Instance.currentGameStatus = GAME_STATUS.CARD_DISTRIBUTE; if (WhoopAssGame.Instance.gameObject.activeSelf) { StartCoroutine(DistributeWhoopAssGameCards()); } WhoopAssGame.Instance.isGameCompleted = false; } }
/// <summary> /// Adds the Texass Game History /// </summary> /// <param name="playerID"></param> /// <param name="playerName"></param> /// <param name="gameRound"></param> /// <param name="betAmount"></param> /// <param name="totalBetAmount"></param> /// <param name="playerAction"></param> public void AddHistory(string playerID, string playerName, TEXASS_GAME_ROUND gameRound, double betAmount, double totalBetAmount, PLAYER_ACTION playerAction) { // if (playerAction == PLAYER_ACTION.SMALL_BLIND) { // if (preflopTexassRoundHistory.Count > 0) // return; // } else if (playerAction == PLAYER_ACTION.BIG_BLIND) { // if (preflopTexassRoundHistory.Count > 1) // return; // } TexassGameHistory history = new TexassGameHistory(); history.playerID = playerID; history.playerName = playerName; history.gameRound = gameRound; history.betAmount = betAmount; history.totalBetAmount = totalBetAmount; history.playerAction = playerAction; switch (gameRound) { case TEXASS_GAME_ROUND.PREFLOP: preflopTexassRoundHistory.Add(history); break; case TEXASS_GAME_ROUND.FLOP: flopTexassRoundHistory.Add(history); break; case TEXASS_GAME_ROUND.TURN: turnTexassRoundHistory.Add(history); break; case TEXASS_GAME_ROUND.RIVER: riverTexassRoundHistory.Add(history); break; } if (betAmount > 0) { TexassGame.Instance.txtGameLog.text += "\n<color=" + APIConstants.HEX_COLOR_LIST_VIEW_HEADER + ">" + playerID + "</color> : " + GetPlayerAction(playerAction) + "->" + Utility.GetAmount(betAmount); } else { if (playerAction != PLAYER_ACTION.SMALL_BLIND && playerAction != PLAYER_ACTION.BIG_BLIND) { TexassGame.Instance.txtGameLog.text += "\n<color=" + APIConstants.HEX_COLOR_LIST_VIEW_HEADER + ">" + playerID + "</color> : " + GetPlayerAction(playerAction); } } Canvas.ForceUpdateCanvases(); TexassGame.Instance.scrollNote.verticalScrollbar.value = 0; }
public List <TexassGameHistory> GetTexassGameHistory(TEXASS_GAME_ROUND round) { switch (round) { case TEXASS_GAME_ROUND.PREFLOP: return(preflopTexassRoundHistory); case TEXASS_GAME_ROUND.FLOP: return(flopTexassRoundHistory); case TEXASS_GAME_ROUND.TURN: return(turnTexassRoundHistory); case TEXASS_GAME_ROUND.RIVER: return(riverTexassRoundHistory); } return(null); }
public void SetTexassGameRound(int round) { switch (round) { case (int)TEXASS_GAME_ROUND.PREFLOP: currentTexassGameRound = TEXASS_GAME_ROUND.PREFLOP; break; case (int)TEXASS_GAME_ROUND.FLOP: currentTexassGameRound = TEXASS_GAME_ROUND.FLOP; OpenTexassFlopCards(); break; case (int)TEXASS_GAME_ROUND.TURN: currentTexassGameRound = TEXASS_GAME_ROUND.TURN; OpenTexassTurnCard(); break; case (int)TEXASS_GAME_ROUND.RIVER: currentTexassGameRound = TEXASS_GAME_ROUND.RIVER; OpenTexassRiverCard(); break; } }