DeckPiece

Server only. One piece of a TabletopDeck: a playing card, or one of your own pieces. It is in the stack, in a player's hand, on a pile, or in the air while it flies.

deckPiece.id

id

The piece's id, as the deck's pieces list gave it: a playing card's rank and suit ('AS', 'TH', '7C', 'RJ' and 'BJ' for the jokers), or your own. Its models are <id>.cgf (lower case) in the deck's models folder.

deckPiece.rank

rank

A playing card's rank: 'A', '2' to '9', 'T' (ten), 'J', 'Q' or 'K'; null for a joker or a piece of your own.

deckPiece.suit

suit

A playing card's suit: 'S' (spades), 'H' (hearts), 'D' (diamonds) or 'C' (clubs); null for a joker or a piece of your own.

deckPiece.deck

deck

The deck it belongs to.

deckPiece.place

place

Where it is: 'stack', 'hand', 'pile', or 'moving' while it flies.

deckPiece.holder

holder

The player whose hand it is in, else null.

deckPiece.pile

pile

The name of the pile it lies on, else null.

deckPiece.faceUp

faceUp

Whether it lies face up on its pile (everyone sees its face). A piece in a hand shows its face to its holder only, unless the hand is revealed.

deckPiece.selected

selected

Whether its holder selected it (raised out of the fan) to play.

deckPiece.data

data

Your own data on the piece (a value, who played it), kept by the deck's save(). You can change it or assign a new object.