|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCard
ZetCard
Represents a card for the game of Set. A card has four attributes: number: (1, 2, or 3), shape: (oval, squiggle, or diamond), fill (outlined, solid, or striped), and color (red, green, or blue). Each attribute is represented by an integer code from 1 to 3.
Constructor Summary | |
ZetCard(int n,
int s,
int f,
int c)
Constructs a Set game card with given attributes. |
Method Summary | |
int |
getColor()
Returns this card's color code: 1 for red, 2 for green, 3 for blue. |
int |
getFill()
Returns this card's fill code: 1 for outlined, 2 for solid, 3 for striped. |
int |
getNumber()
Returns the number of symbols on this card. |
int |
getShape()
Returns this card's shape code: 1 for oval, 2 for squiggle, 3 for diamond. |
java.lang.String |
toString()
Returns a String representation of this card. |
Methods inherited from class Card |
compareTo, equals, getId |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ZetCard(int n, int s, int f, int c)
n
- numbers
- shapef
- fillc
- colorMethod Detail |
public int getNumber()
public int getShape()
public int getFill()
public int getColor()
public java.lang.String toString()
toString
in class Card
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |