示例#1
0
        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++;
            }
        }
示例#2
0
 private static void DisplayWinningPlayerName(Player winningPlayer)
 {
     Console.WriteLine(Environment.NewLine);
     Console.Write(string.Format("{0} Wins", winningPlayer.Name));
     Console.WriteLine(Environment.NewLine);
 }
示例#3
0
        private void WriteGameLog(Player winningPlayer)
        {
            AppendLogBlankLine();

            AppendLogLine("Seed: " + GameofWarDeck.ShuffleSeed);
            AppendLogLine("Rounds: " + _round.ToString());
            AppendLogLine("Winner: " + winningPlayer.Name);
        }
示例#4
0
 private void ResetExistingPlayer(Player player)
 {
     player.Deck.EmptyDeck();
     player.Spoils.EmptyDeck();
     player.Discard.EmptyDeck();
 }
示例#5
0
        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"));
            }
        }
示例#6
0
 private void RecycleDiscard(Player player)
 {
     if (player.Discard.DeckCount > 0)
     {
         player.Discard.ShuffleDeck();
         player.Deck.MergeDecks(player.Discard);
     }
 }
示例#7
0
        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);
            }
        }
示例#8
0
 private void MoveTopDeckBottmFeild(Player player)
 {
     if (player.Deck.DeckCount > 0)
     {
         player.Spoils.AddCardToBottom(player.Deck.PickACard(0));
         player.Deck.RemoveTopCard();
     }
 }
示例#9
0
 private bool IsPlayerVictor(Player player)
 {
     return player.Score == 52;
 }
示例#10
0
        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);
            }
        }