|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.puzzle.drop.util.PieceDestroyer
public class PieceDestroyer
Handles destroying contiguous piece segments in a drop board.
| Nested Class Summary | |
|---|---|
static interface |
PieceDestroyer.DestroyLogic
An interface to be implemented by specific puzzles to detail the parameters and methodology by which pieces are destroyed in the puzzle board. |
| Field Summary |
|---|
| Fields inherited from interface com.threerings.puzzle.drop.data.DropPieceCodes |
|---|
DROP_BLOCK_PIECE_COUNT, PIECE_NONE |
| Fields inherited from interface com.threerings.util.DirectionCodes |
|---|
CARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST |
| Constructor Summary | |
|---|---|
PieceDestroyer(PieceDestroyer.DestroyLogic logic)
Constructs a piece destroyer that destroys pieces as specified by the supplied destroy logic. |
|
| Method Summary | |
|---|---|
List<SegmentInfo> |
destroyPieces(DropBoard board,
DropBoard.PieceOperation destroyOp)
Destroys all pieces in the given board that are in contiguous rows or columns of pieces, returning a list of SegmentInfo objects detailing the destroyed piece segments. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PieceDestroyer(PieceDestroyer.DestroyLogic logic)
| Method Detail |
|---|
public List<SegmentInfo> destroyPieces(DropBoard board,
DropBoard.PieceOperation destroyOp)
SegmentInfo objects detailing the destroyed piece segments.
Note that a single list is used internally to gather the segment info, and so callers that
care to modify the list should create their own copy; also, the pieces in the segments may
overlap, i.e., two segments may contain the same piece.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||