Ejemplo n.º 1
0
    public override IEnumerator StartTurn(List <List <Card> > onBoard, int currentBid, int currentBidScalar, int inPot, int currentTurn)
    {
        takingTurn = true;
        choice     = null;
        cardChoice = -1;

        multiplier.SetSelected(0);
        UpdateBid();
        minBid = Math.Max(Math.Min((currentBid == -1) ? inPot / 2 : currentBid, money), 1);

        SetGUIVisible(true, currentBid, 1);

        while (choice == null || (CanPlayExtraCard(choice.chosenCard) && choice.fourthCard == null))
        {
            if (chosenCard != null)
            {
                PositionGUI(1);
                yield return(hand.PutCardOnTable(chosenCard));

                chosenCard = null;
            }

            yield return(null);
        }

        SetGUIVisible(false, -1, 1);

        if (chosenCard != null)
        {
            if (chosenCard != choice.fourthCard)
            {
                yield return(hand.PutCardOnTable(chosenCard));
            }
            chosenCard = null;
        }

        takingTurn = false;
    }