Esempio 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()));
   }
 }
Esempio n. 2
0
 public void onGameLeave(String player) {
   modelFacade.removePlayer(player);
   gameView.removePlayer(player);
   networkProvider.sendMessage(new StringMessage(localPlayer, "iQuit", localPlayer));
 }