Example #1
0
    /// <summary>
    /// Initialize the game state
    ///
    /// Currently just deals out a full hand
    ///
    /// DESIGN Q: Additional complexity?
    /// </summary>
    public void StartGame()
    {
        //Current deck for both players to full decklist
        //Char stats to default values
        //fill hand to full
        for (int i = 0; i < hand.getMax(); i++)
        {
            string id = playerDeck.GenerateNewCard();

            //does not check if card ID is bad, should re-evaluate.
            Card card = loader.InstantiateCard(id);
            playerDeckDisplay.Deal(card);
        }

        UI.SetTurn(turnCount);
        setDropMode(true);

        //etc. etc.
    }
Example #2
0
    /// <summary>
    /// Checks if the cards in the combo queue match a combo card
    ///
    /// TODO: Should this be checking if 3 cards? Or is that handled adequately already
    /// </summary>
    /// <returns></returns>
    public Card checkForCombo()
    {
        Card[] cards   = GetComponentsInChildren <Card>();
        string cardIDs = "";

        foreach (Card curr in cards)
        {
            cardIDs += curr.cardID;
        }
        if (loader.exists(cardIDs))
        {
            Debug.Log("Combo");
            return(loader.InstantiateCard(cardIDs));
        }
        else
        {
            return(currentAction);
        }
    }