public Game() { RoundsList = new List<Round>(); DeckService = new DeckService(); Human = new Player("Human"); Computer = new Player("Computer"); }
public Round(DeckService deckService,Player human,Player computer) { CounterRound = 0; Human = human; Computer = computer; RoundService = new RoundService(deckService,this); Winner = "Nobody"; Loser = "Nobody"; }
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); } }
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)); }
public PlayerService(Player player) { _player = player; }
public AskDuringRound(DeckService deckService,Player human) { _deckService = deckService; _human = human; }