diff --git a/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java b/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java index 12828239..45c3f385 100644 --- a/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java +++ b/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java @@ -1,7 +1,6 @@ package it.unibo.bombardero.view; import java.awt.CardLayout; -import java.awt.Dimension; import java.awt.image.BufferedImage; import java.awt.Image; @@ -74,7 +73,7 @@ public BombarderoGraphics(final Controller controller) { layout.addLayoutComponent(gameCard, ViewCards.GAME.getStringId()); cardsMap.put(ViewCards.GAME, gameCard); deck.validate(); - + frame.add(deck); showGameScreen(ViewCards.MENU); frame.setVisible(true); @@ -94,16 +93,8 @@ public void update( final List enemiesList, final Optional timeLeft) { cardsMap.get(currentCard).update(map, playerList, enemiesList); - cardsMap.get(currentCard).setTimeLeft(timeLeft.orElse(0l)); - cardsMap.get(currentCard).repaint(0); - } - - public Dimension getFrameSize() { - final Dimension dim = frame.getSize(); - return new Dimension( - dim.width - frame.getInsets().right - frame.getInsets().left, - dim.height - frame.getInsets().top - frame.getInsets().bottom - ); + cardsMap.get(currentCard).setTimeLeft(timeLeft.orElse(0L)); + cardsMap.get(currentCard).repaint(0L); } @Override @@ -121,10 +112,6 @@ public void setMessage(final BombarderoViewMessages message) { cardsMap.get(currentCard).showMessage(message); } - public void displayEndGuide() { - cardsMap.get(currentCard).displayEndView(); - } - @Override public void showEndScreen(final EndGameState gameState) { cardsMap.get(currentCard).displayEndView(gameState); @@ -139,5 +126,5 @@ public ResizingEngine getResizingEngine() { public ResourceGetter getResourceGetter() { return this.resourceGetter; } - + }