Beispiel #1
0
        public void Select()
        {
            Console.Clear();

            var dealer  = DealerFactory.CreateDealer();
            var player1 = PlayerFactory.CreatePlayer(PlayerType.Human);
            var player2 = PlayerFactory.CreatePlayer(PlayerType.Computer);
            var player3 = PlayerFactory.CreatePlayer(PlayerType.Computer);
            var player4 = PlayerFactory.CreatePlayer(PlayerType.Computer);
            var players = new List <IPlayer>()
            {
                player1, player2, player3, player4
            };

            PokerGameFactory.CreateGame(players, dealer).Start();
        }
        static void Main(string[] args)
        {
            Console.Title = "C# Poker Game v3";
            House.DisplayHouseRules();

            IDealer        dealer  = DealerFactory.CreateDealer();
            IPlayer        player1 = PlayerFactory.CreatePlayer(PlayerType.Computer);
            IPlayer        player2 = PlayerFactory.CreatePlayer(PlayerType.Human);
            List <IPlayer> players = new List <IPlayer>()
            {
                player1, player2
            };
            PokerGame pokerGame = PokerGameFactory.CreateGame(players, dealer);

            pokerGame.Start();

            Console.ReadLine();
        }