|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.puzzle.drop.util.PieceDropper
public class PieceDropper
Handles dropping pieces in a board.
| Nested Class Summary | |
|---|---|
static interface |
PieceDropper.DropObserver
Called to inform a drop observer that a piece has been dropped. |
static class |
PieceDropper.PieceDropInfo
A class to hold information detailing the pieces to be dropped in a particular column. |
| Field Summary | |
|---|---|
protected PieceDropLogic |
_logic
Allows puzzle-specific customizations. |
| 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 | |
|---|---|
PieceDropper(PieceDropLogic logic)
Constructs a piece dropper that uses the supplied piece drop logic to specialize itself for a particular puzzle. |
|
| Method Summary | |
|---|---|
protected void |
drop(DropBoard board,
int piece,
int xx,
int yy,
int ty,
PieceDropper.DropObserver drobs)
Helpy helper function. |
protected int |
dropPieces(DropBoard board,
int xx,
int yy,
PieceDropper.DropObserver drobs)
Computes and effects the drop for the specified piece and any associated attached pieces. |
int |
dropPieces(DropBoard board,
PieceDropper.DropObserver drobs)
Effects any drops possible on the supplied board (modifying the board in the progress) and notifying the supplied drop observer of those drops. |
int |
fillBoard(DropBoard board,
PieceDropper.DropObserver drobs)
Drops new pieces onto the board to fill the gaps. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PieceDropLogic _logic
| Constructor Detail |
|---|
public PieceDropper(PieceDropLogic logic)
| Method Detail |
|---|
public int dropPieces(DropBoard board,
PieceDropper.DropObserver drobs)
public int fillBoard(DropBoard board,
PieceDropper.DropObserver drobs)
protected int dropPieces(DropBoard board,
int xx,
int yy,
PieceDropper.DropObserver drobs)
protected final void drop(DropBoard board,
int piece,
int xx,
int yy,
int ty,
PieceDropper.DropObserver drobs)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||