示例#1
0
    private string GetPlayerAction(PLAYER_ACTION action)
    {
        switch (action)
        {
        case PLAYER_ACTION.REBUY:
            return("Rebuy");

        case PLAYER_ACTION.CHECK:
            return("Check");

        case PLAYER_ACTION.BET:
            return("Bet");

        case PLAYER_ACTION.ALLIN:
            return("All in");

        case PLAYER_ACTION.ACTION_WA_DOWN:
            return("WhoopAss Card Down");

        case PLAYER_ACTION.ACTION_WA_UP:
            return("WhoopAss Card Up");

        case PLAYER_ACTION.ACTION_WA_NO:
            return("No WhoopAss Card");

        case PLAYER_ACTION.SMALL_BLIND:
            return("Small Blind");

        case PLAYER_ACTION.BIG_BLIND:
            return("Big Blind");

        case PLAYER_ACTION.RAISE:
            return("Raise");

        case PLAYER_ACTION.CALL:
            return("Call");

        case PLAYER_ACTION.FOLD:
            return("Fold");

        case PLAYER_ACTION.TIMEOUT:
            return("Timeout");
        }

        return("");
    }
示例#2
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);
    }
示例#3
0
    /// <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;
    }
示例#4
0
    /// <summary>
    /// Adds the WhoopAss 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, WHOOPASS_GAME_ROUND gameRound, double betAmount, double totalBetAmount, PLAYER_ACTION playerAction)
    {
        WhoopAssGameHistory history = new WhoopAssGameHistory();

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

        switch (gameRound)
        {
        case WHOOPASS_GAME_ROUND.START:
            startWhoopAssRoundHistory.Add(history);
            break;

        case WHOOPASS_GAME_ROUND.FIRST_FLOP:
            firstWhoopAssRoundHistory.Add(history);
            break;

        case WHOOPASS_GAME_ROUND.SECOND_FLOP:
            secondWhoopAssRoundHistory.Add(history);
            break;

        case WHOOPASS_GAME_ROUND.WHOOPASS_CARD:
            whoopAssCardWhoopAssRoundHistory.Add(history);
            break;

        case WHOOPASS_GAME_ROUND.THIRD_FLOP:
            thirdWhoopAssRoundHistory.Add(history);
            break;
        }

        if (betAmount > 0)
        {
            WhoopAssGame.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)
            {
                WhoopAssGame.Instance.txtGameLog.text += "\n<color=" + APIConstants.HEX_COLOR_LIST_VIEW_HEADER + ">" + playerID + "</color> : " + GetPlayerAction(playerAction);
            }
        }
        Canvas.ForceUpdateCanvases();
        WhoopAssGame.Instance.scrollNote.verticalScrollbar.value = 0;
        //		Debug.LogWarning (playerID + " has " + playerAction + " in " + gameRound + " round.\t\t--> bet amount  : " + betAmount + "\t\t--> total bet amount  : " + totalBetAmount);
    }
示例#5
0
文件: IPlugin.cs 项目: fstarred/wammp
 public SignalArgs(PLAYER_ACTION action)
 {
     this.Action = action;
 }