Exemple #1
0
    public void DrawCard()
    {
        Card handBeforeDraw = boardQuery.GetCurrentHand();
        Card handAfterDraw  = boardQuery.GetNextDrawCard();

        boardActions.TransferCard(handBeforeDraw, simple, CardPile.Hand, CardPile.Discard);
        boardActions.TransferCard(handAfterDraw, simple, CardPile.Draw, CardPile.Hand);

        undoEvents.Push(() =>
        {
            boardActions.TransferCard(handAfterDraw, instant, CardPile.Hand, CardPile.Draw);
            boardActions.TransferCard(handBeforeDraw, instant, CardPile.Discard, CardPile.Hand);
        });
    }
Exemple #2
0
    bool FormsValidRun(Card card)
    {
        Card hand = boardQuery.GetCurrentHand();

        return(card.IsFaceUp &&
               boardQuery.IsContainedIn(card, CardPile.Active) &&
               GameRules.IsValidRun(card.Face, hand.Face));
    }