public final class BoardConstants
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static BoardConstants |
get(int boardSize)
Get board constants for a given board size.
|
ConstPointList |
getAdjacent(GoPoint p) |
ConstPointList |
getHandicapStones(int n)
Get location of handicap stones.
|
ConstPointList |
getPoints()
Get list containing all points on the board.
|
int |
getSize()
Get board size.
|
boolean |
isEdgeLine(int i)
Check if line is on the edge of the board.
|
boolean |
isHandicap(GoPoint p)
Check if point is a potential location of a handicap stone.
|
boolean |
isHandicapLine(int i)
Check if line is a line containing handicap points.
|
public static BoardConstants get(int boardSize)
boardSize
- The new board size (number of points per
row / column) in the range from one to GoPoint.MAX_SIZEpublic ConstPointList getAdjacent(GoPoint p)
public ConstPointList getHandicapStones(int n)
n
- The number of handicap stones.public ConstPointList getPoints()
public int getSize()
public boolean isEdgeLine(int i)
i
- The value of the constant coordinate shared by all points
on the line.true
, if the constant coordinate has the smallest
or largest possible value (0
or
getSize() - 1
).public boolean isHandicapLine(int i)
i
- The value of the constant coordinate shared by all points
on the line.true
, if the line contains handicap points.getHandicapStones(int)
public boolean isHandicap(GoPoint p)
p
- The point to check.getHandicapStones(int)