public class CityDropObject extends DropObject
| Modifier and Type | Field and Description |
|---|---|
private Coordinate |
vertex |
color, controller| Constructor and Description |
|---|
CityDropObject(IMapController controller,
CatanColor color)
Creates a city drop object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Click()
Indicates the mouse button was pressed.
|
Vertex |
GetDropLocation()
Gets the vertex associated with the object.
|
void |
Handle(java.awt.geom.Point2D point)
Used to handle mouse movement.
|
boolean |
IsAllowed()
Returns if the object can be placed at the current location.
|
boolean |
IsValid()
Returns if the location of the object is a valid location.
|
GetClosestHexCoordinate, GetColor, GetSortedVerticiesprivate Coordinate vertex
public CityDropObject(IMapController controller, CatanColor color)
controller - The controller associated with the object.color - The color of the object.public Vertex GetDropLocation() throws MapException
MapException - Thrown if the vertex isn't valid.public boolean IsValid()
DropObjectIsValid in class DropObjectpublic boolean IsAllowed()
DropObjectIsAllowed in class DropObjectpublic void Handle(java.awt.geom.Point2D point)
DropObjectHandle in class DropObjectpoint - The location of the mouse.public void Click()
DropObjectClick in class DropObject