示例#1
0
        public void DisplayShowdown(HandRanker handRanker, PotManager potMan)
        {
            int i;

            // show pots
            Logger.Log("");

            string sLogMsg = "Pots     \t";

            for (i = 0; i < potMan.Pots.Count(); i++)
            {
                sLogMsg += i + "\t";
            }

            sLogMsg += "Total";
            Logger.Log(sLogMsg);

            // !!! only show live players?
            for (i = 0; i < _numPlayers; i++)
            {
                sLogMsg = "Player " + i + "\t";

                // !!! show stack size for player here?

                foreach (var p in potMan.Pots)
                {
                    int value = 0;

                    if (p.PlayerContributions.ContainsKey(i))
                    {
                        value = p.PlayerContributions[i];
                    }

                    sLogMsg += value + "\t";
                }

                sLogMsg += potMan.PlayerContributions(i);
                Logger.Log(sLogMsg);
            }

            sLogMsg = "Total   ";

            foreach (var p in potMan.Pots)
            {
                sLogMsg += "\t" + p.Size();
            }

            Logger.Log(sLogMsg);

            // Show hand ranks
            Logger.Log("");
            Logger.Log("--- Hand Ranks ---");

            foreach (var hri in handRanker.HandRanks)
            {
                var hand = hri.Hand;

                sLogMsg = hand.HandRankStr() + " ";

                for (i = 0; i < hand.NumSubRanks(); i++)
                {
                    sLogMsg += hand.SubRank(i) + " ";
                }

                sLogMsg += "Players (" + string.Join(",", hri.Players) + ")";
                Logger.Log(sLogMsg);
            }

            Logger.Log("");
        }
示例#2
0
        public void DisplayAction(Stage stage, int playerId, ActionType action, int totalAmount, int betSize, int callAmount, int raiseAmount, bool isAllIn, PotManager potMan)
        {
            string sLogMsg = "";

            sLogMsg += string.Format("Player {0} {1} {2}", playerId, action, totalAmount);

            if (action == ActionType.Raise)
            {
                sLogMsg += string.Format(" ({0} call + {1} raise)", callAmount, raiseAmount);
            }

            if (isAllIn)
            {
                sLogMsg += " *ALL IN*";
            }

            Logger.Log(sLogMsg);
        }