/** Attempt to host a game. */
 private void attemptHost() {
   mainGame.killMultiplayer();
   mainGame.setLanMultiplayer(true);
   processPlayerHost();
   mainGame.resetLifeCount();
   mainGame.resetLevelCount();
   mainGame.setScore(0);
   mainGame.spawnHost(new Host(MainGame.getMultiplayerPort(), mainGame, gameState));
   mainGame.setIsHost(true);
   mainGame.setIsClient(false);
   Logger.getInstance().log("Host started", Logger.PriorityLevels.VERYHIGH, "multiplayer");
 }
 /** Attempt to join a game. */
 private void attemptJoin() {
   mainGame.killMultiplayer();
   mainGame.setLanMultiplayer(true);
   processPlayerClient();
   mainGame.resetLifeCount();
   mainGame.resetLevelCount();
   mainGame.setScore(0);
   Client client =
       new Client(ipField.getText(), MainGame.getMultiplayerPort(), mainGame, gameState);
   mainGame.spawnClient(client);
   mainGame.setIsClient(true);
   mainGame.setIsHost(false);
   Logger.getInstance().log("Client started", Logger.PriorityLevels.VERYHIGH, "multiplayer");
 }