private static void DealCards(PlayingDeck Deck, Player PlayerOne, Player PlayerTwo) { int CardCount = 0; while (CardCount != Deck.DeckCount) { PlayerOne.Deck.Add(Deck.PickACard(CardCount)); CardCount++; PlayerTwo.Deck.Add(Deck.PickACard(CardCount)); CardCount++; } }
private static void DisplayWinningPlayerName(Player winningPlayer) { Console.WriteLine(Environment.NewLine); Console.Write(string.Format("{0} Wins", winningPlayer.Name)); Console.WriteLine(Environment.NewLine); }
private void WriteGameLog(Player winningPlayer) { AppendLogBlankLine(); AppendLogLine("Seed: " + GameofWarDeck.ShuffleSeed); AppendLogLine("Rounds: " + _round.ToString()); AppendLogLine("Winner: " + winningPlayer.Name); }
private void ResetExistingPlayer(Player player) { player.Deck.EmptyDeck(); player.Spoils.EmptyDeck(); player.Discard.EmptyDeck(); }
private void SetupNewPlayers() { Console.Clear(); DisplayConsole.GoWASCII(); Console.Write(Environment.NewLine); NumberofPlayers = DisplayConsole.HowManyPlayers(); if (NumberofPlayers <= 0 || NumberofPlayers >= 3) { Player1 = new Player(FirstPlayer); Player2 = new Player(SecondPlayer); } if (NumberofPlayers == 1) { Player1 = new Player(DisplayConsole.PlayerName("1")); Player2 = new Player(SecondPlayer); } if (NumberofPlayers == 2) { Player1 = new Player(DisplayConsole.PlayerName("1")); Player2 = new Player(DisplayConsole.PlayerName("2")); } }
private void RecycleDiscard(Player player) { if (player.Discard.DeckCount > 0) { player.Discard.ShuffleDeck(); player.Deck.MergeDecks(player.Discard); } }
private void PrepareBountyForSkirmish(Player name) { for (int i = 0; i < 3; i++) { if (name.Deck.DeckCount == 0) RecycleDiscard(Player1); if (name.Deck.DeckCount == 0) break; MoveTopDeckBottmFeild(name); } }
private void MoveTopDeckBottmFeild(Player player) { if (player.Deck.DeckCount > 0) { player.Spoils.AddCardToBottom(player.Deck.PickACard(0)); player.Deck.RemoveTopCard(); } }
private bool IsPlayerVictor(Player player) { return player.Score == 52; }
private void DisplayInColorSkirmishCards(Player thePlayer, int col, int row, int direction) { for (int CardPosition = 0; CardPosition < thePlayer.Spoils.DeckCount; CardPosition++) { SetCardColor(thePlayer.Spoils, CardPosition); Console.SetCursorPosition(col, (row + CardPosition * direction)); Console.Write("{0}", thePlayer.Spoils[CardPosition]); DisplayPauseWar(thePlayer.Spoils); } }