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 Round(DeckService deckService,Player human,Player computer)
 {
     CounterRound = 0;
     Human = human;
     Computer = computer;
     RoundService = new RoundService(deckService,this);
     Winner = "Nobody";
     Loser = "Nobody";
 }
Ejemplo n.º 3
0
 private static void ShowCards(Player player)
 {
     var counterCards = 0;
     Console.WriteLine("Cards:");
     foreach (var card in player.PlayerCards)
     {
         Console.WriteLine(" {0}. {1}:{2} - {3}",
             ++counterCards, card.CardName, card.CardSuit, card.CardValue);
     }
 }
Ejemplo n.º 4
0
 public void ShowInfoAboutGame(Player human, Player computer, int counterRound)
 {
     Console.Clear();
     Player[] arrayPlayers = { human, computer };
     PrintHeader();
     Console.WriteLine("Round: {0}", counterRound);
     foreach (Player player in arrayPlayers)
     {
         Console.WriteLine(new string('-', 50));
         Console.WriteLine("\tInformation about player \"{0}\"", player.PlayerName);
         Console.WriteLine("Number of wins: {0}", player.CounterWins);
         ShowCards(player);
         Console.WriteLine("Total score: {0}", player.TotalScoreOnCards);
     }
     Console.WriteLine(new string('-', 50));
 }
Ejemplo n.º 5
0
 public PlayerService(Player player)
 {
     _player = player;
 }
Ejemplo n.º 6
0
 public AskDuringRound(DeckService deckService,Player human)
 {
     _deckService = deckService;
     _human = human;
 }