示例#1
0
        public void Update(Controller controller)
        {
            if (Card == null)
                return;

            if (controller.HasClicked(this))
            {
                controller.Player.Play(this.Card);
            }
        }
示例#2
0
        public void startGame()
        {
            int PlayerCount = 1; //TEMPORARY!!*****
            store = new Store();

            //adds players to game
            for (int i = 0; i < PlayerCount; i++)
            {
                Player p = new Player();
                p.Store = store;
                _controller = new Controller(p);
                p.Buys = 10;
                p.Coins = 6;
                for (int j = 0; j < 7; j++)
                {
                    CopperCard cc = new CopperCard();
                    store.buyCard(p, cc);
                }

                for (int k = 0; k < 3; k++)
                {

                    EstateCard ec = new EstateCard();
                    store.buyCard(p, ec);
                }

                p.name = ("Player " + (i+1).ToString());
                players.Add(p);
            }

            foreach (Player p in players)
            {
                p.shuffleDeck();
                p.endTurn();
            }
            currentPlayerIndex = 0;
            bAction.player = (players[currentPlayerIndex]);
        }
示例#3
0
 public void Update(Controller controller)
 {
     if (controller.HasClicked(this))
     {
         controller.Player.BuyCard(TopCard());
     }
 }