public void DiscardPileSelected(Discard discard) { bool turnOK = (turnPhase == TurnPhase.Player1 || turnPhase == TurnPhase.Player2); bool expectingOK = (expecting == Expecting.DiscardPile || expecting == Expecting.CardSlotOrDiscardPile); if (phase == Phase.NormalTurns && turnOK && expectingOK && selectedCard != null) { selectedCard.PutIn(discard); selectedCard.ShowAllRatings(turnPhase); selectedCard = null; if (!playedCard && !playerDiscard) { playerDiscard = true; expecting = Expecting.Card; UI.Instance.UpdateInstructions("Play 1 card OR discard another cards to play 1 from the discard pile."); } else if (playedCard && !playerDiscard) { playerDiscard = true; InitNextTurn(); } else if (!playedCard && playerDiscard) { if (turnPhase == TurnPhase.Player1) { player1Hand.NotYourTurn(); discardPile.DealCards(player1DiscardHand); UI.Instance.UpdateInstructions("Play one card from the discard pile."); } else if (turnPhase == TurnPhase.Player2) { player2Hand.NotYourTurn(); discardPile.DealCards(player2DiscardHand); UI.Instance.UpdateInstructions("Play one card from the discard pile."); } doubleDiscard = true; expecting = Expecting.Card; } } }