Methods
equal(otherPos) → {boolean}
compare one position to another
This:
Parameters:
Name | Type | Description |
---|---|---|
otherPos |
PiecePosition | the position to compare to |
- Source:
Returns:
is this position to some other position.
- Type
- boolean
initialize(x, y) → {PiecePosition}
creates a new instance
This:
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x co-ordinate. |
y |
number | y co-ordinate. |
- Source:
Returns:
the new instance of this class.
The method checks if the values given to it are in the 0..7 range.
- Type
- PiecePosition
notEqual(otherPos) → {boolean}
compare one position to another
This:
Parameters:
Name | Type | Description |
---|---|---|
otherPos |
PiecePosition | the position to compare to |
- Source:
Returns:
is this position to some other position.
- Type
- boolean
toString() → {string}
toString method so that you can get a nice printout of
instances of this type
This:
- Source:
Returns:
the string representation of this instance.
- Type
- string