public interface IMapController extends IController
Modifier and Type | Method and Description |
---|---|
void |
AddMapObserver(MapObserver listener) |
void |
CancelMove() |
boolean |
CanPlaceCity(Coordinate point,
CatanColor color)
This method is called whenever the user is trying to place a city on the
map.
|
boolean |
CanPlaceRoad(Coordinate p1,
Coordinate p2,
CatanColor color)
This method is called whenever the user is trying to place a road on the
map.
|
boolean |
CanPlaceRobber(Coordinate point)
This method is called whenever the user is trying to place the robber on
the map.
|
boolean |
CanPlaceSettlement(Coordinate point,
CatanColor color)
This method is called whenever the user is trying to place a settlement
on the map.
|
DropObject |
GetDropObject() |
java.util.Iterator<Edge> |
GetEdges()
Gets all the edges in the map.
|
java.util.Iterator<Hex> |
GetHexes()
Gets all the hexes in the map.
|
IMapModel |
GetModel() |
java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<Hex>>> |
GetPips()
Gets all the pips in the map.
|
java.util.Iterator<java.util.Map.Entry<Edge,Hex>> |
GetPorts()
Gets all the ports on the map.
|
Hex |
GetRobberPlacement()
Gets the location of the robber.
|
java.util.Iterator<Vertex> |
GetVertices()
Gets all the vertices in the map.
|
boolean |
IsRobberInitialized() |
void |
MouseClick() |
void |
MouseMove(java.awt.geom.Point2D worldPoint) |
void |
PlaceCity(Coordinate point) |
void |
PlaceRoad(Coordinate p1,
Coordinate p2) |
void |
PlaceRobber(Coordinate point) |
void |
PlaceSettlement(Coordinate point) |
getView
boolean CanPlaceRoad(Coordinate p1, Coordinate p2, CatanColor color)
p1
- The beginning of the road piecep2
- The end of the road piece (it's the end of the road, get it? Never mind...)color
- The color of the road being placedboolean CanPlaceSettlement(Coordinate point, CatanColor color)
point
- the location of the vertexcolor
- the color of the piece being placedboolean CanPlaceCity(Coordinate point, CatanColor color)
point
- the location of the vertexcolor
- the color of the piece being placedboolean CanPlaceRobber(Coordinate point)
point
- the coordinate of the hexjava.util.Iterator<Hex> GetHexes()
java.util.Iterator<Edge> GetEdges()
java.util.Iterator<Vertex> GetVertices()
java.util.Iterator<java.util.Map.Entry<Edge,Hex>> GetPorts()
java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<Hex>>> GetPips()
Hex GetRobberPlacement() throws MapException
MapException
boolean IsRobberInitialized()
DropObject GetDropObject()
void PlaceRoad(Coordinate p1, Coordinate p2)
void PlaceSettlement(Coordinate point)
void PlaceCity(Coordinate point)
void PlaceRobber(Coordinate point)
void CancelMove()
void MouseMove(java.awt.geom.Point2D worldPoint)
void MouseClick()
IMapModel GetModel()
void AddMapObserver(MapObserver listener)