public class PieceDropper extends Object implements DropPieceCodes
| Modifier and Type | Class and Description |
|---|---|
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.
|
DROP_BLOCK_PIECE_COUNT, PIECE_NONECARDINAL_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 and Description |
|---|
PieceDropper(PieceDropLogic logic)
Constructs a piece dropper that uses the supplied piece drop logic to specialize itself for
a particular puzzle.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public PieceDropper(PieceDropLogic logic)
public int dropPieces(DropBoard board, PieceDropper.DropObserver drobs)
public int fillBoard(DropBoard board, PieceDropper.DropObserver drobs)
Copyright © 2015. All rights reserved.