A Card object can be a circle, square, or printable character. A printable character can be a letter, digit, or punctuation mark (ASCII 33 - 126). Every Card object has 4 colors associated with it: foreground, background, border, and pen color. The pen color is used for the outline of the circle/square. The border color is used for the border of the cell containing the Card object. A Card object is always contained within a CardStack object.
Properties:
value: 0 = empty, 1 = circle, 2 = square, 33 – 126 = printable char. (ASCII value); a negative value indicates Card object belongs to opposing player in a 2-player game.
character: one-character string (null string if not printable character)
colors: foregroundColor, backgroundColor, borderColor, penColor
dimensions: width, height (in pixels)
margins: leftMargin, topMargin (in pixels); distance from upper left corner of circle/square to upper left corner of cell
hasBorder: if true, a rectangular one-pixel wide border is displayed, marking the border of the cell
transparent: if true, the circle/square or printable char. is treated as a transparent bitmap.
canDrag: if false, user cannot drag away this Card object
canDrop: if false, user cannot drop Card objects onto this Card object
Playing Cards
Printable chars.: AKQJ098765432
Suit colors: spades = black, clubs = gray, hearts = red, diamonds = pink