コード例 #1
0
    public bool Execute(Card card)  //Execute discard action
    {
        if (currentState.DiscardCard(card))
        {
            currentState.hasDrawn = false;

            foreach (TurnState state in mStates)   //After a card discarded, automatically change state
            {
                if (currentState.NextTurn == state.MyTurn)
                {
                    currentState = state;
                    return(true);
                }
            }
        }
        return(false);
    }