|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectZetTable
Represents a card table with a deck and an array of open cards for the game of Set.
Constructor Summary | |
ZetTable()
Creates a new deck and opens dfltOpenCards cards. |
Method Summary | |
int |
cardsInDeck()
Returns the number of cards left in the deck. |
void |
compactOpenCards()
If there are gaps in the first dfltOpenCards and some open cards beyond dfltOpenCards, the latter are moved to fill the gaps. |
boolean |
enoughOpen()
Indicates whether there is a sufficient number of open cards. |
int[] |
findZet()
Finds a "set" in the open cards. |
ZetCard |
getOpenCard(int i)
Returns the open card with a given index. |
boolean |
open3Cards()
Opens three cards from the deck if three cards are available in the deck. |
void |
remove3Cards(int[] indices)
Removes three cards with given indices from the open cards. |
java.lang.String |
toString()
Returns a string representation of this "set table". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ZetTable()
Method Detail |
public int cardsInDeck()
public ZetCard getOpenCard(int i)
public boolean enoughOpen()
public int[] findZet()
public boolean open3Cards()
public void remove3Cards(int[] indices)
public void compactOpenCards()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |