Ejemplo n.º 1
0
 public Game()
 {
     RoundsList = new List<Round>();
     DeckService = new DeckService();
     Human = new Player("Human");
     Computer = new Player("Computer");
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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";
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 5
0
 public AskBeforeNewRound(DeckService deckService)
 {
     _printInfo = new PrintInfo();
     _deckService = deckService;
 }
Ejemplo n.º 6
0
 public AskDuringRound(DeckService deckService,Player human)
 {
     _deckService = deckService;
     _human = human;
 }