Пример #1
0
 public Game()
 {
     RoundsList = new List<Round>();
     DeckService = new DeckService();
     Human = new Player("Human");
     Computer = new Player("Computer");
 }
Пример #2
0
 public void TakeNCardsAndUpdateTotalScore(DeckService deckService, int countCard)
 {
     for (var i = 0; i < countCard; i++)
     {
         var card = deckService.GetFirstCard();
         _player.PlayerCards.Enqueue(card);
         _player.TotalScoreOnCards += card.CardValue;
     }
 }
Пример #3
0
 public Round(DeckService deckService,Player human,Player computer)
 {
     CounterRound = 0;
     Human = human;
     Computer = computer;
     RoundService = new RoundService(deckService,this);
     Winner = "Nobody";
     Loser = "Nobody";
 }
Пример #4
0
 public void ShowAllCardsInDeck(DeckService deckService)
 {
     Console.Clear();
     var counterCards = 0;
     foreach (var card in deckService)
     {
         Console.WriteLine("{0}. {1}:{2} - {3}",
               ++counterCards, card.CardName, card.CardSuit, card.CardValue);
     }
 }
Пример #5
0
 public AskBeforeNewRound(DeckService deckService)
 {
     _printInfo = new PrintInfo();
     _deckService = deckService;
 }
Пример #6
0
 public AskDuringRound(DeckService deckService,Player human)
 {
     _deckService = deckService;
     _human = human;
 }