|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--VASSAL.build.module.map.SimplePieceCollection
Stores GamePieces in a simple array
| Constructor Summary | |
SimplePieceCollection()
|
|
| Method Summary | |
void |
add(GamePiece p)
Adds a piece |
boolean |
canMerge(GamePiece p1,
GamePiece p2)
Return true if the two pieces can be merged into a single stack |
void |
clear()
Remove all pieces |
GamePiece[] |
getPieces()
Return all pieces in the collection as a read-only array |
int |
indexOf(GamePiece p)
Returns the index of a piece. |
void |
moveToBack(GamePiece p)
Reposition a piece to the back of all others in the same layer |
void |
moveToFront(GamePiece p)
Reposition a piece to the front of all others in the same layer |
void |
remove(GamePiece p)
Removes the piece |
void |
reposition(GamePiece s,
int pos)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimplePieceCollection()
| Method Detail |
public int indexOf(GamePiece p)
indexOf in interface PieceCollection
public boolean canMerge(GamePiece p1,
GamePiece p2)
PieceCollectioncanMerge in interface PieceCollectionpublic void add(GamePiece p)
PieceCollectionadd in interface PieceCollectionpublic void clear()
PieceCollectionclear in interface PieceCollectionpublic void remove(GamePiece p)
PieceCollectionremove in interface PieceCollectionpublic GamePiece[] getPieces()
PieceCollectiongetPieces in interface PieceCollection
public void reposition(GamePiece s,
int pos)
public void moveToBack(GamePiece p)
PieceCollectionmoveToBack in interface PieceCollectionpublic void moveToFront(GamePiece p)
PieceCollectionmoveToFront in interface PieceCollection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||