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