Beispiel #1
0
        public void Play(Player p, Supply s)
        {
            //Player gains the first two treasures
            var discards = new List<Card>();
            int numTreasuresAdded = 0;

            Card card;
            do
            {
                card = p.PopDeck();
                if (card is ITreasureCard)
                {
                    numTreasuresAdded++;
                    p.PutInHand(card);
                }
                else
                {
                    discards.Add(card);
                }

            } while (numTreasuresAdded < 2 && card != null);

            foreach (Card c in discards)
            {
                p.Gain(c);
            }
        }
Beispiel #2
0
        public Game()
        {
            player = new Player();
            supply = new Supply();

            for(int i =0; i < 7; i++)
            {
                player.Gain( supply.Release("Copper"));
            }
            Card e = new Estate();
            for(int i =0; i < 3; i++)
            {
                player.Gain( e );
            }

            gameState = new GameStateContext(player, supply);
            gameState.StateChange += () =>
                {
                    OnStateChange();
                };

            player.NewHand();
        }