Package com.amirhn.Pieces
Class Queen
java.lang.Object
com.amirhn.Pieces.Piece
com.amirhn.Pieces.Queen
The type Queen.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetThreatenedLocations
(Board board) Gets threatened locations.void
Remove location.void
setLocation
(Location location) Sets location.void
setLocationBack
(Location location) Sets location back.Methods inherited from class com.amirhn.Pieces.Piece
canBeCapturedBy, copy, equals, generate, generate, getAllowedMoves, getLocation, getNaturalMoves, getSymbol, hashCode, hasMoved, isAllowedToMove, toString
-
Constructor Details
-
Queen
Instantiates a new Queen.- Parameters:
color
- the colorlocation
- the location
-
-
Method Details
-
setLocation
Sets location.- Overrides:
setLocation
in classPiece
- Parameters:
location
- the location
-
setLocationBack
Sets location back.- Overrides:
setLocationBack
in classPiece
- Parameters:
location
- the location
-
removeLocation
public void removeLocation()Remove location.- Overrides:
removeLocation
in classPiece
-
getThreatenedLocations
Gets threatened locations.- Specified by:
getThreatenedLocations
in classPiece
- Parameters:
board
- the board- Returns:
- the threatened locations
-