public void PickUpAdventureCards(int player, int amount)
 {
     for (int i = 0; i < amount; i++)
     {
         GameObject adventureCard = advDeck.Draw();
         adventureCard.transform.SetParent(gameUsers.findByUserName("Player" + player).GetComponent <User> ().getHand().transform);
     }
     logger.info("GameManager.cs :: AdventureCards :: Player " + player + " Picked up: " + amount + " adventure cards.");
 }
Exemple #2
0
        public void AdventureDeckCheck()
        {
            Quest.Core.Logger log  = new Quest.Core.Logger("AdventureDeckCheck");
            QuestMatch        game = ScenarioCreator.GameNoDeal(3);
            AdventureDeck     deck = new AdventureDeck(game);

            Assert.IsTrue(deck.Peek(deck) == "Test Of The Questing Beast");

            for (int i = 0; i < 77; i++)
            {
                deck.Draw();
                if (i == 2)
                {
                    Assert.IsTrue(deck.Peek(deck) == "Test Of Morgan Le Fey");
                }
                if (i == 10)
                {
                    Assert.IsTrue(deck.Peek(deck) == "Thieves");
                }
                if (i == 20)
                {
                    Assert.IsTrue(deck.Peek(deck) == "Saxons");
                }
                if (i == 30)
                {
                    Assert.IsTrue(deck.Peek(deck) == "Robber Knight");
                }
            }
        }
Exemple #3
0
    void drawCards(GameObject[] participants)
    {
        AdventureDeck advDeck = GameObject.Find("advdeck").GetComponent <AdventureDeck> ();

        foreach (GameObject i in participants)
        {
            advDeck.Draw().transform.SetParent(i.transform.GetChild(0));
        }
    }