com.threerings.puzzle.drop.util
Class DropBoardUtil
java.lang.Object
com.threerings.puzzle.drop.util.DropBoardUtil
- All Implemented Interfaces:
- DirectionCodes
public class DropBoardUtil
- extends Object
- implements DirectionCodes
| 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 |
|
Method Summary |
static int |
getRotatedOrientation(int orient,
int dir)
Returns the orientation resulting from rotating the block in the given direction. |
static int |
getRotatedOrientation(int orient,
int dir,
int count)
Returns the orientation resulting from rotating the block in the given direction the
specified number of times. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DropBoardUtil
public DropBoardUtil()
getRotatedOrientation
public static int getRotatedOrientation(int orient,
int dir,
int count)
- Returns the orientation resulting from rotating the block in the given direction the
specified number of times.
- Parameters:
orient - the current orientation.dir - the direction to rotate in; one of CW or CCW.count - the number of rotations to perform.
- Returns:
- the rotated orientation.
getRotatedOrientation
public static int getRotatedOrientation(int orient,
int dir)
- Returns the orientation resulting from rotating the block in the given direction.
- Parameters:
orient - the current orientation.dir - the direction to rotate in; one of CW or CCW.
- Returns:
- the rotated orientation.