public interface PieceDropLogic
| Modifier and Type | Method and Description |
|---|---|
boolean |
boardAlwaysFilled()
Should the board always be filled?
|
int |
getConstrainedEdge(DropBoard board,
int col,
int row,
int dir)
Returns the x-axis coordinate of the specified edge of the given constrained piece.
|
boolean |
isClimbablePiece(boolean allowConst,
int piece,
boolean pre)
Returns whether the given piece terminates a column climb when determining the height of a
piece column to be dropped.
|
boolean |
isConstrainedPiece(int piece)
Returns whether the given piece has constraints upon it that impact its droppability.
|
boolean |
isDroppablePiece(int piece)
Returns whether the given piece is potentially droppable.
|
boolean boardAlwaysFilled()
boolean isDroppablePiece(int piece)
boolean isConstrainedPiece(int piece)
boolean isClimbablePiece(boolean allowConst,
int piece,
boolean pre)
allowConst - whether to allow dropping constrained pieces (though only in the first
encountered constrained block.)piece - the piece to consider.pre - whether the climbability check is being performed before the height is
incremented, or after.int getConstrainedEdge(DropBoard board, int col, int row, int dir)
TODO: This should go away once the sword and sail games have standardized on WEST/EAST or BLOCK_LEFT/BLOCK_RIGHT to reference block edges.
board - the board to search.col - the column of the constrained piece.row - the row of the constrained piece.dir - the edge direction to find; one of DirectionCodes.LEFT or
DirectionCodes.RIGHT.Copyright © 2015. All rights reserved.