Skip to content

Commit

Permalink
Solved checkstyles
Browse files Browse the repository at this point in the history
  • Loading branch information
bagarozzi committed Jul 8, 2024
1 parent c838f20 commit 518f6b2
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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);
Expand All @@ -94,16 +93,8 @@ public void update(
final List<Character> enemiesList,
final Optional<Long> 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
Expand All @@ -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);
Expand All @@ -139,5 +126,5 @@ public ResizingEngine getResizingEngine() {
public ResourceGetter getResourceGetter() {
return this.resourceGetter;
}

}

0 comments on commit 518f6b2

Please sign in to comment.