예제 #1
0
        static void Main(string[] args)
        {
            Table table = new Table();

            //var playerOne = new PokerPlayer { Name = "Player one" };
            //var playerTwo = new PokerPlayer { Name = "Player Two" };
            //var playerThree = new PokerPlayer { Name = "Player Three" };
            //var playerFour = new PokerPlayer { Name = "Player Four" };

            //table.AddPlayer(playerOne);
            //table.AddPlayer(playerTwo);
            //table.AddPlayer(playerThree);
            //table.AddPlayer(playerFour);

            //table.StartNewGame();
            //Console.WriteLine(table);
            //var results = table.GetResults();
            //Console.WriteLine(results);

            // Test situation



            table.AddPlayer(PokerPlayer.GetHighCardPlayer());
            table.AddPlayer(PokerPlayer.GetOnePairPlayer());
            table.AddPlayer(PokerPlayer.GetTwoPairPlayer());
            table.AddPlayer(PokerPlayer.GetThreeKindPlayer());
            table.AddPlayer(PokerPlayer.GetStraightPlayer());
            table.AddPlayer(PokerPlayer.GetFlushPlayer());
            table.AddPlayer(PokerPlayer.GetFullHousePlayer());
            table.AddPlayer(PokerPlayer.GetFourKindPlayer());
            table.AddPlayer(PokerPlayer.GetStraightFlushPlayer());
            table.AddPlayer(PokerPlayer.GetRoyalFlushPlayer());

            Console.WriteLine(table);

            var results = table.GetResults();

            Console.WriteLine(results);
        }
예제 #2
0
 public void AddPlayer(PokerPlayer player)
 {
     Players.Add(player);
 }