public interface IMapController extends IController
Modifier and Type | Method and Description |
---|---|
void |
cancelMove()
This method is called from the modal map overlay when the cancel button
is pressed.
|
boolean |
canPlaceCity(VertexLocation vertLoc)
This method is called whenever the user is trying to place a city on the
map.
|
boolean |
canPlaceRoad(EdgeLocation edgeLoc)
This method is called whenever the user is trying to place a road on the
map.
|
boolean |
canPlaceRobber(HexLocation hexLoc)
This method is called whenever the user is trying to place the robber on
the map.
|
boolean |
canPlaceSettlement(VertexLocation vertLoc)
This method is called whenever the user is trying to place a settlement
on the map.
|
void |
placeCity(VertexLocation vertLoc)
This method is called when the user clicks the mouse to place a city.
|
void |
placeRoad(EdgeLocation edgeLoc)
This method is called when the user clicks the mouse to place a road.
|
void |
placeRobber(HexLocation hexLoc)
This method is called when the user clicks the mouse to place the robber.
|
void |
placeSettlement(VertexLocation vertLoc)
This method is called when the user clicks the mouse to place a
settlement.
|
void |
playRoadBuildingCard()
This method is called when the user plays a "road building" progress
development card.
|
void |
playSoldierCard()
This method is called when the user plays a "soldier" development card.
|
void |
robPlayer(RobPlayerInfo victim)
This method is called by the Rob View when a player to rob is selected
via a button click.
|
void |
startMove(PieceType pieceType,
boolean isFree,
boolean allowDisconnected)
This method is called when the user requests to place a piece on the map
(road, city, or settlement)
|
getView
boolean canPlaceRoad(EdgeLocation edgeLoc)
edgeLoc
- The proposed road locationboolean canPlaceSettlement(VertexLocation vertLoc)
vertLoc
- The proposed settlement locationboolean canPlaceCity(VertexLocation vertLoc)
vertLoc
- The proposed city locationboolean canPlaceRobber(HexLocation hexLoc)
hexLoc
- The proposed robber locationvoid placeRoad(EdgeLocation edgeLoc)
edgeLoc
- The road locationvoid placeSettlement(VertexLocation vertLoc)
vertLoc
- The settlement locationvoid placeCity(VertexLocation vertLoc)
vertLoc
- The city locationvoid placeRobber(HexLocation hexLoc)
hexLoc
- The robber locationvoid startMove(PieceType pieceType, boolean isFree, boolean allowDisconnected)
pieceType
- The type of piece to be placedisFree
- true if the piece should not cost the player resources, false
otherwise. Set to true during initial setup and when a road
building card is played.allowDisconnected
- true if the piece can be disconnected, false otherwise. Set to
true only during initial setup.void cancelMove()
void playSoldierCard()
void playRoadBuildingCard()
void robPlayer(RobPlayerInfo victim)
victim
- The player to be robbed