|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectks.common.model.Element
ks.common.model.Stack
ks.common.model.BuildablePile
A Model Element consisting of a pile of face down cards, on top of which one can build downwards.
Creation date: (11/9/01 9:48:33 PM)
Constructor Summary | |
BuildablePile()
BuildablePile constructor comment. |
|
BuildablePile(java.lang.String name)
Construct an empty BuildablePile with given name. |
Method Summary | |
boolean |
faceUp()
Returns whether the top of the BuildablePile is face up. |
boolean |
flipCard()
Flips the faceup state of the topmost card on the BuildablePile. |
int |
getNumFaceDown()
Return the number of cards in this BuildablePile that are face down. |
int |
getNumFaceUp()
Return the number of cards in this BuildablePile that are face up. |
Methods inherited from class ks.common.model.Stack |
add, alternatingColors, alternatingColors, ascending, ascending, count, descending, descending, deselect, empty, get, getNumSelectedCards, getSelected, peek, peek, push, rank, removeAll, sameColor, sameColor, sameRank, sameRank, sameSuit, sameSuit, select, select, suit, toString |
Methods inherited from class ks.common.model.Element |
getListener, getName, setListener, setName |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BuildablePile()
public BuildablePile(java.lang.String name)
name
- StringMethod Detail |
public boolean faceUp()
Note: an empty BuildablePile is returned as false
public boolean flipCard()
Generates modelChanged action if BuildablePile is not empty.
public int getNumFaceDown()
public int getNumFaceUp()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |