Skip to content

CardZone

namespace Griff.Modules.Cards;
public abstract class CardZone : Component

A place cards go: a Deck, a Hand or a PlayZone. Its cards are the entities inside it with a Card, in order (the last is a deck’s top card, a hand’s rightmost), and it lays them out: a card that comes in slides to its place.

public IReadOnlyList<Card> Cards { get; }

The cards in it, in order: the entities inside it with a Card.

public int Count { get; }

How many cards are in it. Kept up to date by the game; in a network game, players’ machines are sent it.

public int IndexOf(Card card)

Where card is among its Cards, or -1 if it isn’t in it.