Ejemplo n.º 1
0
        public void Draw_The_Top_Card_From_The_Deck()
        {
            var expectedCard =
                new PlayingCard(ACE, HEARTS);
            PlayingCard card = deck.DrawCard();

            card.Should().NotBeNull().And.Be(expectedCard);
        }
Ejemplo n.º 2
0
    IEnumerator LateStart()
    {
        yield return(new WaitForEndOfFrame());

        Card theCard = _deck.DrawCard();

        _turnHandler.StartNewTurn(theCard, PlayersArray, _startIndex);
        FindObjectOfType <UIControler>().OnStartNewTurn(_startIndex, theCard);
    }
Ejemplo n.º 3
0
    public void DealMeIn(List <DeckOfCards.Card> currentHand, Transform handBase, Text total, int currentHandValue)
    {
        if (!stay)
        {
            DeckOfCards.Card card = deck.DrawCard();

            GameObject cardObj = Instantiate(Resources.Load("prefab/Card")) as GameObject;
            cards.Add(cardObj);

            ShowCard(card, cardObj, handBase, currentHand.Count);

            currentHand.Add(card);

            ShowValue(currentHand, handBase, total, currentHandValue);
        }
    }
Ejemplo n.º 4
0
    public void HitMe()
    {
        if (!stay)
        {
            DeckOfCards.Card card = deck.DrawCard();

            GameObject cardObj = Instantiate(Resources.Load("prefab/Card")) as GameObject;

            ShowCard(card, cardObj, hand.Count);

            hand.Add(card);

            ShowValue();
        }
    }