Package controller
Class Controller
java.lang.Object
controller.Controller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
mouseClickRequest
(Coordinate coordinate, ICallBack callBack) Handles every mouse click (on grid system) from the uservoid
regularUpdateRequest
(int dayPass, ICallBack callBack) Update the game model regularly with calculated time pass.void
switchGameModeRequest
(GameMode gameMode) Handles client request of mode switching (Button click)void
switchTimeModeRequest
(TimeMode timeMode) Handles client request of time mode switching (Button click)void
updateTaxRate
(double newTaxRate, ICallBack callBack) Updates the tax rate.
-
Constructor Details
-
Controller
-
-
Method Details
-
mouseClickRequest
Handles every mouse click (on grid system) from the user- Parameters:
coordinate
- the coordinate of the cell the user click in grid sense.callBack
- will be called after the handle of the request, can be null for defaults.
-
switchGameModeRequest
Handles client request of mode switching (Button click)- Parameters:
gameMode
- the mode to switch to.
-
switchTimeModeRequest
Handles client request of time mode switching (Button click)- Parameters:
timeMode
- the time mode to switch to
-
regularUpdateRequest
Update the game model regularly with calculated time pass. The actual day pass will be according to the time mode.- Parameters:
dayPass
- the pass of time in the unit of day.callBack
- will be called after the handle of the request, can be null for defaults.
-
updateTaxRate
Updates the tax rate.- Parameters:
newTaxRate
- the new rate.callBack
- will be called after the handle of the request, can be null for defaults.
-