Members
(static) types
Array of piece types
- Source:
Methods
initialize(type) → {PieceType}
creates a new instance
This:
Parameters:
Name | Type | Description |
---|---|---|
type |
string | the type of the piece. |
- Source:
Returns:
the new instance.
- Type
- PieceType
isBishop() → {boolean}
Return whether the piece is a bishop
This:
- Source:
Returns:
is this piece a bishop.
- Type
- boolean
isKing() → {boolean}
Return whether the piece is a king
This:
- Source:
Returns:
is this piece a king.
- Type
- boolean
isKnight() → {boolean}
Return whether the piece is a knight
This:
- Source:
Returns:
is this piece a knight.
- Type
- boolean
isPawn() → {boolean}
Return whether the piece is a pawn
This:
- Source:
Returns:
is this piece a pawn.
- Type
- boolean
isQueen() → {boolean}
Return whether the piece is a queen
This:
- Source:
Returns:
is this piece a queen.
- Type
- boolean
isRook() → {boolean}
Return whether the piece is a rook
This:
- Source:
Returns:
is this piece a rook.
- Type
- boolean
toString() → {string}
toString method that allows you to get a nice printout for this type
This:
- Source:
Returns:
string representation of this instance.
- Type
- string