resources.ResourceBarController Class
Controller class for the Resources View.
Constructor
resources.ResourceBarController
-
view
-
clientModel
-
actions
Parameters:
-
view
resources.ViewThe resource view
-
clientModel
models.ClientModelThe client model
-
actions
ObjectThe actions to take for each user input. The value of actions.elem_name is a function that is called when the specific element is selected (accessed by calling actions["elem_name"]). The valid element names are defined in StudentDefinitions.js
Item Index
Methods
Methods
buildCity
()
The action to take on clicking the resource bar city button. Brings up the map overlay and allows you to place a city.
Returns:
void
buildRoad
()
The action to take on clicking the resource bar road button. Brings up the map overlay and allows you to place a road.
Returns:
void
buildSettlement
()
The action to take on clicking the resource bar settlement button. Brings up the map overlay and allows you to place a settlement.
Returns:
void
buyCard
()
The action to take on clicking the resource bar "buy a card" button. Should bring up the "buy a card" overlay.
Returns:
void
playCard
()
The action to take on clicking the resource bar "play a card" button. Should bring up the "play a card" overlay.
Returns:
void