Package it.polimi.ingsw.controller
Class Controller
- java.lang.Object
-
- it.polimi.ingsw.utils.Observable<String>
-
- it.polimi.ingsw.controller.Controller
-
- All Implemented Interfaces:
Observer<Notification>
public class Controller extends Observable<String> implements Observer<Notification>
Controller for Game
-
-
Constructor Summary
Constructors Constructor Description Controller(Game game)
Create an instance of Controller that manage the Game
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
startGame()
Function to notify all client about current Game State and to start Gamevoid
update(Notification notification)
On Notification parse the message and verify if it is a valid data-
Methods inherited from class it.polimi.ingsw.utils.Observable
addObservers, addObservers, notify, notify
-
-
-
-
Constructor Detail
-
Controller
public Controller(Game game)
Create an instance of Controller that manage the Game- Parameters:
game
- the reference to game
-
-
Method Detail
-
update
public void update(Notification notification)
On Notification parse the message and verify if it is a valid data- Specified by:
update
in interfaceObserver<Notification>
- Parameters:
notification
- message received
-
startGame
public void startGame()
Function to notify all client about current Game State and to start Game
-
-