public void TestDraw() { QuestMatch game = ScenarioCreator.EmptyGame(); AdventureDeck deck = new AdventureDeck(game); Player player = new Player("Test Player", game); player.Draw(deck, 10); Assert.AreEqual(player.Hand.Count, 10); Assert.AreEqual(deck.Count, deck.DeckSize - 10); }
public void TransferCards() { // Transfer cards from player hand to battle area. KingArthur testCard = new KingArthur(ScenarioCreator.EmptyGame()); Hand playerHand = new Hand(null); PlayerArea battleArea = new PlayerArea(); playerHand.Add(testCard); playerHand.Transfer(battleArea, testCard); Assert.AreEqual(playerHand.Count, 0); Assert.AreEqual(battleArea.Count, 1); }
private void OnCreateGame(Player player, JToken data) { QuestMatch match = ScenarioCreator.EmptyGame(this); int scenario = (int)data["scenario"]; if (scenario == 1) { match = ScenarioCreator.Scenario1(this); } if (scenario == 2) { match = ScenarioCreator.Scenario2(this); } player.Behaviour = new HumanPlayer(); match.AddPlayer(player); this.matches.Add(player, match); this.UpdatePlayers(this.matches[player]); }