private void PlayCards() { tokenStash = GenerateNewDeck(); DeckActions.Shuffle(tokenStash); //foreach (var token in tokenStash) //{ // Debug.Log(token); //} }
void PlayCards() { itemDeck = GenerateNewDeck(); DeckActions.Shuffle(itemDeck); //foreach (var card in itemDeck) //{ // Debug.Log(card); //} }
void PlayCards() { exploringDeck = GenerateNewDeck(); DeckActions.Shuffle(exploringDeck); //foreach (var card in exploringDeck) //{ // Debug.Log(card); //} }
private void PlayCards() { beastDeck = GenerateNewDeck(); DeckActions.Shuffle(beastDeck); //foreach (var card in beastDeck) //{ // Debug.Log(card); //} }
public void AddCards_insertTwoCards_deckHasTwoCards() { GameObject test = new GameObject(); test.name = "AddCards_insertTwoCards_deckHasTwoCards"; GameObject obj = Helpers.MakeDeckObject(test.transform); DeckActions deck = obj.GetComponent <DeckActions> (); GameObject[] cardsToAdd = Helpers.MakeCards(2, test.transform); deck.AddCards(cardsToAdd); bool deckHasTwoCards = (deck.DeckCount() == 2); Assert.That(deckHasTwoCards); GameObject.DestroyImmediate(test); }
public void DrawCards_drawTwoCards_deckHasTwoLessCards() { GameObject test = new GameObject(); test.name = "DrawCards_drawTwoCards_deckHasTwoLessCards"; GameObject obj = Helpers.MakeDeckObject(test.transform); DeckActions deck = obj.GetComponent <DeckActions> (); GameObject[] cardsToAdd = Helpers.MakeCards(4, test.transform); deck.AddCards(cardsToAdd); int deckCountBeforeDraw = deck.DeckCount(); deck.DrawCards(2); int deckCountAfterDraw = deck.DeckCount(); bool deckIsTwoLess = ((deckCountBeforeDraw - deckCountAfterDraw) == 2); Assert.That(deckIsTwoLess); GameObject.DestroyImmediate(test); }
public void AddCards_insertOneCard_deckHasOneCard() { GameObject test = new GameObject(); test.name = "AddCards_insertOneCard_deckHasOneCard"; //arrange GameObject obj = Helpers.MakeDeckObject(test.transform); obj.transform.parent = test.transform; DeckActions deck = obj.GetComponent <DeckActions> (); GameObject[] cardToAdd = Helpers.MakeCards(1, test.transform); //act deck.AddCards(cardToAdd); //assert bool deckHasOneCard = (deck.DeckCount() == 1); Assert.That(deckHasOneCard); //cleanup GameObject.DestroyImmediate(test); }
public void DrawCards_draw4CardsOutOfDeckOf2With2Discards_deckAndDiscardsEmpty() { GameObject test = new GameObject(); test.name = "DrawCards_draw4CardsOutOfDeckOf2With2Discards_deckAndDiscardsEmpty"; GameObject obj = Helpers.MakeDeckObject(test.transform); DeckActions deck = obj.GetComponent <DeckActions> (); GameObject[] cardsToAdd = Helpers.MakeCards(2, test.transform); deck.AddCards(cardsToAdd); GameObject[] cardsToDiscard = Helpers.MakeCards(2, test.transform); deck.DiscardCards(cardsToDiscard); deck.DrawCards(4); int deckCount = deck.DeckCount(); int discardCount = deck.DiscardCount(); //Debug.Log (deckCount); //Debug.Log (discardCount); bool decksAreEmpty = (0 == (deckCount + discardCount)); Assert.That(decksAreEmpty); GameObject.DestroyImmediate(test); }
public void PushAndShuffel(ICard card) { EventDeck.Add(card); DeckActions.Shuffle(EventDeck); }
void Awake() { deck = GetComponent <DeckActions> (); mainMesh = GetComponent <MeshRenderer> (); UpdateDeckDisplay(); }