java.lang.Object
app.chess.ChessPiece
- All Implemented Interfaces:
Piece
Information about ChessPiece that is exposed to the users of chess package
-
Field Details
-
piece
AbstractChessPiece piece
-
-
Constructor Details
-
ChessPiece
-
-
Method Details
-
getPosition
- Specified by:
getPosition
in interfacePiece
- Returns:
- position this piece is located at
-
isAlive
public boolean isAlive() -
getPlayer
public int getPlayer() -
getKind
- Returns:
- kind of the piece - pawn, rook, etc.
-
getColor
- Returns:
- color of the piece - black or white
-
toString
-
unwrap
AbstractChessPiece unwrap()Unwraps stored AbstractChessPiece for internal chess usage- Returns:
- underlying chess piece
-
equals
-
hashCode
public int hashCode()
-