예제 #1
0
파일: Hand.cs 프로젝트: smiles/codeninja
 public Player()
 {
     _hand = new PlayingDeck();
     _deck = new PlayingDeck();
     _discard = new PlayingDeck();
     _field = new PlayingDeck();
 }
예제 #2
0
파일: Player.cs 프로젝트: smiles/codeninja
        public static void DealCards(PlayingDeck Deck, Player PlayerOne, Player PlayerTwo)
        {
            int CardCount = 0;

               while (CardCount != Deck.DeckCount)
               {
               PlayerOne.PlayersDeck.AddCardToBottom(Deck.PickACard(CardCount));
               CardCount++;
               PlayerTwo.PlayersDeck.AddCardToBottom(Deck.PickACard(CardCount));
               CardCount++;
               }
        }
예제 #3
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++;
            }
        }
예제 #4
0
파일: Dealer.cs 프로젝트: smiles/codeninja
        public Dealer(int Decks)
        {
            Discard = new GameDeck();
            Deck = new PlayingDeck();
            Hand = new GameDeck();

            for (int IncrementDeck = 1; IncrementDeck < Decks; IncrementDeck++)
            {
                PlayingDeck addDeck = new PlayingDeck();
                Deck.MergeDecks(addDeck);
            }

            Deck.ShuffleDeck();
        }
예제 #5
0
 private void GameSetup()
 {
     autoPlay = !AskYesOrNoQuestion("Would you like to pause between plays?");
     _round = 0;
     GameofWarDeck = new PlayingDeck();
     GameofWarDeck.NewSeed();
     GameofWarDeck.ShuffleDeck();
     DealCards(GameofWarDeck, Player1, Player2);
 }