diff --git a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClientListener.java b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClientListener.java index 8a9ff01..fd8aa8c 100644 --- a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClientListener.java +++ b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClientListener.java @@ -4,7 +4,6 @@ import com.esotericsoftware.kryonet.Connection; import com.esotericsoftware.kryonet.Listener; import inf112.fiasko.roborally.elementproperties.GameState; import inf112.fiasko.roborally.gamewrapper.RoboRallyWrapper; -import inf112.fiasko.roborally.gamewrapper.screens.CardChoiceScreen; import inf112.fiasko.roborally.networking.containers.ErrorResponse; import inf112.fiasko.roborally.networking.containers.GameStartInfo; import inf112.fiasko.roborally.networking.containers.PowerdownContainer; @@ -12,8 +11,6 @@ import inf112.fiasko.roborally.networking.containers.ProgamsContainer; import inf112.fiasko.roborally.objects.ProgrammingCardDeck; import inf112.fiasko.roborally.objects.RoboRallyGame; -import java.util.concurrent.TimeUnit; - /** * This listener handles all receiving from the server */ @@ -38,20 +35,17 @@ class RoboRallyClientListener extends Listener { GameStartInfo info = (GameStartInfo) object; wrapper.roboRallyGame = new RoboRallyGame(info.getPlayerList(), info.getBoardName(), wrapper.server != null, info.getPlayerName(), wrapper.client, wrapper.server); - } - else if(object instanceof ProgrammingCardDeck){ + } else if (object instanceof ProgrammingCardDeck) { wrapper.roboRallyGame.setGameState(GameState.CHOOSING_CARDS); wrapper.roboRallyGame.setPlayerHand((ProgrammingCardDeck) object); - } - else if(object instanceof ProgamsContainer){ + } else if (object instanceof ProgamsContainer) { try { - wrapper.roboRallyGame.reciveAllProgrammes((ProgamsContainer) object); + wrapper.roboRallyGame.receiveAllPrograms((ProgamsContainer) object); } catch (InterruptedException e) { e.printStackTrace(); } - } - else if (object instanceof PowerdownContainer){ - wrapper.roboRallyGame.recivedStayInPowerdown((PowerdownContainer) object); + } else if (object instanceof PowerdownContainer) { + wrapper.roboRallyGame.receiveStayInPowerDown((PowerdownContainer) object); } }