示例#1
0
    /// <summary>
    /// Gets the history.
    /// </summary>
    /// <returns>The history.</returns>
    /// <param name="round">Round.</param>
    public List <History> GetTableGameHistory(TABLE_GAME_ROUND round)
    {
        switch (round)
        {
        case TABLE_GAME_ROUND.START:
            return(anteAndBlindTableRoundHistory);

        case TABLE_GAME_ROUND.FIRST_BET:
            return(firstTableRoundHistory);

        case TABLE_GAME_ROUND.SECOND_BET:
            return(secondTableRoundHistory);

        case TABLE_GAME_ROUND.THIRD_BET:
            return(thirdTableRoundHistory);

        case TABLE_GAME_ROUND.WHOOPASS:
            return(whoopAssCardTableRoundHistory);

        case TABLE_GAME_ROUND.PLAY:
            return(playTableRoundHistory);
        }

        return(null);
    }
示例#2
0
    public void SetTableGameRound(int round)
    {
        switch (round)
        {
        case (int)TABLE_GAME_ROUND.FIRST_BET:
            currentTableGameRound = TABLE_GAME_ROUND.FIRST_BET;
            DistributeTableGameCards();
            break;

        case (int)TABLE_GAME_ROUND.PLAY:
            currentTableGameRound = TABLE_GAME_ROUND.PLAY;
            OpenThirdFlopCards();
            OpenWhoopAssCard();
            break;

        case (int)TABLE_GAME_ROUND.SECOND_BET:
            currentTableGameRound = TABLE_GAME_ROUND.SECOND_BET;
            OpenFirstFlopCards();
            break;

        case (int)TABLE_GAME_ROUND.START:
            currentTableGameRound = TABLE_GAME_ROUND.START;
            break;

        case (int)TABLE_GAME_ROUND.THIRD_BET:
            currentTableGameRound = TABLE_GAME_ROUND.THIRD_BET;
            OpenSecondFlopCards();
            break;

        case (int)TABLE_GAME_ROUND.WHOOPASS:
            currentTableGameRound = TABLE_GAME_ROUND.WHOOPASS;
            break;
        }
    }
示例#3
0
    /// <summary>
    /// Adds the Table 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>
    /// <param name="isBetOnStraight"></param>
    public void AddHistory(string playerID, string playerName, TABLE_GAME_ROUND gameRound, double betAmount, double totalBetAmount, PLAYER_ACTION playerAction, bool isBetOnStraight)
    {
        History history = new History();

        history.playerID       = playerID;
        history.playerName     = playerName;
        history.gameRound      = gameRound;
        history.betAmount      = betAmount;
        history.totalBetAmount = totalBetAmount;
        history.playerAction   = playerAction;

        switch (gameRound)
        {
        case TABLE_GAME_ROUND.START:
            anteAndBlindTableRoundHistory.Add(history);
            break;

        case TABLE_GAME_ROUND.FIRST_BET:
            firstTableRoundHistory.Add(history);
            break;

        case TABLE_GAME_ROUND.SECOND_BET:
            secondTableRoundHistory.Add(history);
            break;

        case TABLE_GAME_ROUND.THIRD_BET:
            thirdTableRoundHistory.Add(history);
            break;

        case TABLE_GAME_ROUND.WHOOPASS:
            whoopAssCardTableRoundHistory.Add(history);
            break;

        case TABLE_GAME_ROUND.PLAY:
            whoopAssCardTableRoundHistory.Add(history);
            break;
        }

        if (betAmount > 0)
        {
            GameManager.Instance.txtGameLog.text += "\n<color=" + APIConstants.HEX_COLOR_LIST_VIEW_HEADER + ">" + playerID + "</color> : " + GetPlayerAction(playerAction) + "->" + Utility.GetAmount(betAmount);
        }
        else
        {
            GameManager.Instance.txtGameLog.text += "\n<color=" + APIConstants.HEX_COLOR_LIST_VIEW_HEADER + ">" + playerID + "</color> : " + GetPlayerAction(playerAction);
        }
        Canvas.ForceUpdateCanvases();
//		GameManager.Instance.scrollNote.verticalScrollbar.value = 0;
//		Debug.LogWarning (playerID + " has " + playerAction + " in " + gameRound + " round.\t\t--> bet amount  : " + betAmount + "\t\t--> total bet amount  : " + totalBetAmount);
    }