public GameEnvironment() { characterName = this.GetType().Name; deck = new Deck(characterName, IPlayer.PlayerType.Environment); deck.shuffle(); graveyard = new List<Card>(); cardsOnField = new List<Card>(); }
public Hero() { //ongoingEffects = new List<Ongoings>(); characterName = this.GetType().Name; deck = new Deck(characterName, IPlayer.PlayerType.Hero); deck.shuffle(); graveyard = new List<Card>(); hand = new List<Card>(); cardsOnField = new List<Card>(); drawPhase(4); }
public void TestShuffle() { Deck testHaka = new Deck("haka", IPlayer.PlayerType.Hero); Deck testHakaShuffled = new Deck("haka", IPlayer.PlayerType.Hero); testHakaShuffled.shuffle(); int sameCount = 0; for (int i = 0; i < testHaka.cards.Count; i++) { if (testHaka.cards[i] == testHakaShuffled.cards[i]) { sameCount++; } } Assert.False(testHaka.cards.Count == sameCount); }