public class ResourceBarController extends Controller implements IResourceBarController
Constructor and Description |
---|
ResourceBarController(IResourceBarView view) |
Modifier and Type | Method and Description |
---|---|
void |
buildCity()
Called by the view then the user requests to build a city
|
void |
buildRoad()
Called by the view then the user requests to build a road
|
void |
buildSettlement()
Called by the view then the user requests to build a settlement
|
void |
buyCard()
Called by the view then the user requests to buy a card
|
IResourceBarView |
getView()
View getter
|
void |
playCard()
Called by the view then the user requests to play a card
|
void |
setElementAction(ResourceBarElement element,
IAction action)
Sets the action to be executed when the specified resource bar element is clicked by the user
|
public ResourceBarController(IResourceBarView view)
public IResourceBarView getView()
IController
getView
in interface IController
getView
in class Controller
public void setElementAction(ResourceBarElement element, IAction action)
element
- The resource bar element with which the action is associatedaction
- The action to be executedpublic void buildRoad()
IResourceBarController
buildRoad
in interface IResourceBarController
public void buildSettlement()
IResourceBarController
buildSettlement
in interface IResourceBarController
public void buildCity()
IResourceBarController
buildCity
in interface IResourceBarController
public void buyCard()
IResourceBarController
buyCard
in interface IResourceBarController
public void playCard()
IResourceBarController
playCard
in interface IResourceBarController