Ejemplo n.º 1
0
 public Game(HandCalculator handCalculator, Deck deck, List <Player> initialPlayers)
 {
     _handCalculator = handCalculator;
     _deck           = deck.Shuffle();
     Players         = initialPlayers;
     _playerHands    = Players.ToDictionary(player => player.Id, player => new List <string> {
     });
     CurrentPlayer   = Players[0].Id;
     Pot             = 0;
     Deal();
 }
Ejemplo n.º 2
0
        public TableSummary StartGame(string tableId)
        {
            var deck           = new Deck();
            var cardValues     = new CardValues();
            var handCalculator = new HandCalculator(cardValues, new HandValues(cardValues));
            var table          = _tables[tableId];
            var game           = new Game(handCalculator, deck, table.Players);

            table.Game      = game;
            table.isPlaying = true;
            return(table.GetTableSummary());
        }