added the constructors for all client states and their statemachines
This commit is contained in:
@@ -1,4 +1,36 @@
|
||||
package pp.mdga.client;
|
||||
|
||||
import pp.mdga.game.Game;
|
||||
import pp.mdga.message.client.ClientMessage;
|
||||
import pp.mdga.server.ServerSender;
|
||||
|
||||
public class ClientGameLogic {
|
||||
static final System.Logger LOGGER = System.getLogger(ClientGameLogic.class.getName());
|
||||
|
||||
private Game game;
|
||||
private final ClientSender clientSender;
|
||||
private ClientState state;
|
||||
|
||||
public ClientGameLogic(Game game, ClientSender clientSender) {
|
||||
this.game = game;
|
||||
this.clientSender = clientSender;
|
||||
state = new ClientAutomaton(this);
|
||||
}
|
||||
|
||||
public void send(ClientMessage msg){
|
||||
LOGGER.log(System.Logger.Level.INFO, "send {0}", msg);
|
||||
clientSender.send(msg);
|
||||
}
|
||||
|
||||
public ClientSender getClientSender(){
|
||||
return clientSender;
|
||||
}
|
||||
|
||||
public Game getGame(){
|
||||
return game;
|
||||
}
|
||||
|
||||
public ClientState getState(){
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user