Esempio n. 1
0
        public void ProcessOrder(GameOrder order)
        {
            yace.DrawCardToZone("MainDeck", PlayerIndex.Current, "PlayerHand", PlayerIndex.Current);
            Zone playerHand = yace.GetSingleZone("PlayerHand");

            if (order is Order_Score)
            {
                int          multiplier = yace.GetRessourceValue("Multiplier");
                CardInstance card       = playerHand.Cards[0];
                int          value      = card.GetValue("Value");
                yace.AlterRessource("Score", multiplier * value);
                yace.SetRessource("Multiplier", 1, PlayerIndex.Current);
            }
            else if (order is Order_Multiply)
            {
                yace.AlterRessource("Multiplier", 1);
            }

            yace.DrawCartToZone("PlayerHand", "DiscardPile");
            yace.EndPlayerTurn();
        }
Esempio n. 2
0
        private void PlayOneTurn()
        {
            yace.DrawCardToZone("MainDeck", PlayerIndex.Current, "PlayerHand", PlayerIndex.Current);
            Zone playerHand = yace.GetSingleZone("PlayerHand");

            System.Console.WriteLine(playerHand.ToString());
            PlayerAction playerAction = ReadNextAction();

            if (playerAction == PlayerAction.Multiply)
            {
                yace.AlterRessource("Multiplier", 1);
            }
            else if (playerAction == PlayerAction.Score)
            {
                int          multiplier = yace.GetRessourceValue("Multiplier");
                CardInstance card       = playerHand.Cards[0];
                int          value      = card.GetValue("Value");
                yace.AlterRessource("Score", multiplier * value);
                //TODO reset ressource
                yace.SetRessource("Multiplier", 1, PlayerIndex.Current);
            }
        }