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

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