Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        saveAndLoad = new SaveAndLoad();
        if (saveAndLoad.Load())
        {
            player.Credit = saveAndLoad.Credit;
        }
        else
        {
            player.Credit = STARTING_CREDIT;
        }
        deck.BuildDeck();
        deck.ShuffleDeck();
        allChips.MakeChips();

        player.ResetHand();
        handResultsText = new List <Text>();
        betChips        = new List <Chip>();
        creditText.text = ConvertToDollars(player.Credit);
        canBet          = true;
        standButton.gameObject.SetActive(false);
        splitButton.gameObject.SetActive(false);
        hitButton.gameObject.SetActive(false);
        doubleButton.gameObject.SetActive(false);
        gameOverImage.gameObject.SetActive(false);
        betButton.gameObject.SetActive(false);
        redoBetButton.gameObject.SetActive(false);
    }
Exemple #2
0
        public void DeckOfCardsBuilt()
        {
            var DeckOfCards = new DeckOfCards();
            var deck        = DeckOfCards.BuildDeck();

            Assert.AreEqual(52, deck.Count());
            Assert.Contains("king of diamonds", deck);
        }
Exemple #3
0
 public void BasicTest()
 {
     string[] deck = DeckOfCards.BuildDeck();
     Assert.AreEqual(52, deck.Length, "Your deck should have 52 cards");
 }