new Coordinate(iopt, jopt)
Create a helper class to create coordinates from (1,2) (zero-based),
'ah' type of input. You can create a coordinate with no arguments, in
which case it defaults to (0,0), or with one argument, in which case it
tries to parse 'ai' type of string coordinate, or with two arguments, (i,j).
'J18' style coordinates depend on board size due to number running from
bottom, so those need to be instantiated from Board.getCoordinate.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
i |
int |
<optional> |
Column or SGF-style string. |
j |
int |
<optional> |
Row. |
- Source:
Methods
copy() → {Coordinate}
Make a copy of this coordinate.
- Source:
Returns:
A copy of this coordinate.
- Type
- Coordinate
equals() → {boolean}
Compare with another coordinate.
Parameters:
Name | Type | Description |
---|---|---|
Coordinate. |
Coordinate |
- Source:
Returns:
true if equal, false if not.
- Type
- boolean
toString() → {string}
Make an SGF-type 'ai' string representation of the coordinate.
- Source:
Returns:
String representation.
- Type
- string