Method Summary |
static int |
above(int xy)
Return the coordinate one point above the coordinate
passed as a parameter. |
static int |
below(int xy)
Return the coordinate one point below the coordinate
passed as a parameter. |
static void |
checkRange(int xy)
|
static void |
clear(byte[] array)
|
static void |
clear(int[] array)
|
static void |
clear(long[] array)
|
static void |
clear(java.lang.Object[] array)
|
static void |
clear(short[] array)
|
static void |
copy(byte[] src,
byte[] dest)
|
static void |
copy(int[] src,
int[] dest)
|
static void |
copy(long[] src,
long[] dest)
|
static void |
copy(java.lang.Object[] src,
java.lang.Object[] dest)
|
static void |
copy(short[] src,
short[] dest)
|
static byte[] |
createBytes()
|
static int[] |
createIntegers()
|
static long[] |
createLongs()
|
static java.lang.Object[] |
createObjects()
|
static short[] |
createShorts()
|
static byte[] |
getBoardArray(int size)
This method creates an array for a Go board of a given size
with an edge around the board-points. |
static byte[] |
getRowArray(int size)
This method creates an array for a Go board of a given size
with at each point the distance to the edge of the board. |
static int |
getX(int xy)
|
static int |
getY(int xy)
|
static boolean |
isNeighbour(int xy1,
int xy2)
Creation date: (07-May-01 2:36:04 PM)
|
static int |
left(int xy)
Return the coordinate one point to the left of the coordinate
passed as a parameter. |
static void |
link(byte value,
int startXY,
byte[] board,
byte[] numbers)
|
static void |
link(int value,
int startXY,
byte[] board,
int[] numbers)
|
static void |
link(java.lang.Object value,
int startXY,
byte[] board,
java.lang.Object[] objects)
|
static void |
recycleByteArray(byte[] array)
|
static void |
recycleIntArray(int[] array)
|
static int |
right(int xy)
Return the coordinate one point to the rigth of the coordinate
passed as a parameter. |
static int |
toXY(int x,
int y)
Convert a 2-dimensional coordinate to a 1 dimensional coordinate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WIDTH
public static final int WIDTH
FIRST
public static final int FIRST
MAX
public static final int MAX
LAST
public static final int LAST
ILLEGAL_VALUE
public static final int ILLEGAL_VALUE
GoArray
public GoArray()
clear
public static final void clear(byte[] array)
clear
public static final void clear(short[] array)
clear
public static final void clear(int[] array)
clear
public static final void clear(long[] array)
clear
public static final void clear(java.lang.Object[] array)
copy
public static final void copy(byte[] src,
byte[] dest)
copy
public static final void copy(short[] src,
short[] dest)
copy
public static final void copy(int[] src,
int[] dest)
copy
public static final void copy(long[] src,
long[] dest)
copy
public static final void copy(java.lang.Object[] src,
java.lang.Object[] dest)
createBytes
public static final byte[] createBytes()
createShorts
public static final short[] createShorts()
createIntegers
public static final int[] createIntegers()
createLongs
public static final long[] createLongs()
createObjects
public static final java.lang.Object[] createObjects()
link
public static final void link(int value,
int startXY,
byte[] board,
int[] numbers)
link
public static final void link(byte value,
int startXY,
byte[] board,
byte[] numbers)
link
public static final void link(java.lang.Object value,
int startXY,
byte[] board,
java.lang.Object[] objects)
above
public static final int above(int xy)
- Return the coordinate one point above the coordinate
passed as a parameter.
Creation date: (17-May-01 3:14:46 PM)
below
public static final int below(int xy)
- Return the coordinate one point below the coordinate
passed as a parameter.
Creation date: (17-May-01 3:14:46 PM)
checkRange
public static final void checkRange(int xy)
getBoardArray
public static final byte[] getBoardArray(int size)
- This method creates an array for a Go board of a given size
with an edge around the board-points. The size of the array
is always the same, but the points not used are marked
with the value GoConst.SIDE.
Creation date: (17-May-01 11:53:42 AM)
getRowArray
public static final byte[] getRowArray(int size)
- This method creates an array for a Go board of a given size
with at each point the distance to the edge of the board.
Any point that is not on the board gets a value 0.
Very sneakily, the board-size is stored in the last element
of the array, so be careful...
This is basically an array with static data that is very handy.
To minimize memory use, the array is reused for each board-size
so make sure the array never gets used to store other data.
Creation date: (17-May-01 11:53:42 AM)
getX
public static final int getX(int xy)
getY
public static final int getY(int xy)
isNeighbour
public static final boolean isNeighbour(int xy1,
int xy2)
Creation date: (07-May-01 2:36:04 PM)
left
public static final int left(int xy)
- Return the coordinate one point to the left of the coordinate
passed as a parameter.
Creation date: (17-May-01 3:14:46 PM)
right
public static final int right(int xy)
- Return the coordinate one point to the rigth of the coordinate
passed as a parameter.
Creation date: (17-May-01 3:14:46 PM)
toXY
public static final int toXY(int x,
int y)
- Convert a 2-dimensional coordinate to a 1 dimensional coordinate.
Creation date: (17-May-01 3:16:26 PM)
recycleByteArray
public static final void recycleByteArray(byte[] array)
recycleIntArray
public static final void recycleIntArray(int[] array)