Exemplo n.º 1
0
 private void sendState() {
   if (asHost) {
     networkProvider.sendMessage(
         new GameStateMessage(localPlayer, "gameState", modelFacade.getGameState()));
   } else {
     networkProvider.sendMessage(
         new GameStateMessage(localPlayer, "gameState", modelFacade.getGameState()));
   }
 }
Exemplo n.º 2
0
 public void onGameLeave(String player) {
   modelFacade.removePlayer(player);
   gameView.removePlayer(player);
   networkProvider.sendMessage(new StringMessage(localPlayer, "iQuit", localPlayer));
 }