Package com.amirhn.Players
Class Player
java.lang.Object
com.amirhn.Players.Player
The type Player.
-
Field Summary
Modifier and TypeFieldDescriptionThe Captured pieces.boolean
The Had long castling.boolean
The Had short castling. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetActivePieces
(Board board) Gets active pieces.getAllowedMoves
(Chess chess) Gets allowed moves.getColor()
Gets color.Gets king.getKingSideRook
(Board board) Gets king side rook.getNaturalMoves
(Board board) Gets natural moves.Gets pieces.getQueenSideRook
(Board board) Gets queen side rook.Gets rooks.getThreatenedLocations
(Board board) Gets threatened locations.boolean
isThreatening
(Board board, Location location) Is threatening boolean.
-
Field Details
-
capturedPieces
The Captured pieces. -
hadLongCastling
public boolean hadLongCastlingThe Had long castling. -
hadShortCastling
public boolean hadShortCastlingThe Had short castling.
-
-
Constructor Details
-
Player
Instantiates a new Player.- Parameters:
color
- the color
-
-
Method Details
-
getColor
Gets color.- Returns:
- the color
-
getActivePieces
Gets active pieces.- Parameters:
board
- the board- Returns:
- the active pieces
-
getNaturalMoves
Gets natural moves.- Parameters:
board
- the board- Returns:
- the natural moves
-
getAllowedMoves
Gets allowed moves.- Parameters:
chess
- the chess- Returns:
- the allowed moves
-
getThreatenedLocations
Gets threatened locations.- Parameters:
board
- the board- Returns:
- the threatened locations
-
getPieces
Gets pieces.- Parameters:
board
- the boardpieceType
- the piece type- Returns:
- the pieces
-
getKing
Gets king.- Parameters:
board
- the board- Returns:
- the king
-
getRooks
Gets rooks.- Parameters:
board
- the board- Returns:
- the rooks
-
getKingSideRook
Gets king side rook.- Parameters:
board
- the board- Returns:
- the king side rook
-
getQueenSideRook
Gets queen side rook.- Parameters:
board
- the board- Returns:
- the queen side rook
-
isThreatening
Is threatening boolean.- Parameters:
board
- the boardlocation
- the location- Returns:
- the boolean
-