public Game(GameSettings gameSettings) { var deckDivisionStrategyFactory = new DealerFactory(); var handOutStrategy = deckDivisionStrategyFactory.Create(gameSettings.DealerStrategyType); var deck = new Deck(gameSettings.NumberOfJokersInDeck); _playerOne = new CardStack(); _playerTwo = new CardStack(); handOutStrategy.DealCards(deck, _playerOne, _playerTwo); _result = new GameResult(); }
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(); }
private IDealer GetTestDealer() { return(DealerFactory.CreateDealer()); }