From 0575c4207228745f5f7f0a7159736877a79cd403 Mon Sep 17 00:00:00 2001 From: Federico Bagattoni Date: Mon, 8 Jul 2024 23:14:16 +0200 Subject: [PATCH] Solved PMD's --- .../it/unibo/bombardero/view/BombarderoGraphics.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java b/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java index ea245ac6..9cb8c304 100644 --- a/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java +++ b/src/main/java/it/unibo/bombardero/view/BombarderoGraphics.java @@ -32,9 +32,6 @@ public final class BombarderoGraphics implements GraphicsEngine { private final JPanel deck; private final CardLayout layout = new CardLayout(); - private final GamePlayCard gameCard; - private final GamePlayCard guideCard; - private final MenuCard menuCard; private ViewCards currentCard; private final Map cardsMap = new HashMap<>(); @@ -58,9 +55,9 @@ public BombarderoGraphics(final Controller controller) { frame.setLocationRelativeTo(null); frame.setIconImage(gameIconImage.getScaledInstance(64, 64, Image.SCALE_SMOOTH)); - menuCard = new MenuCard(controller, this, resourceGetter); - this.guideCard = new GuideCard(controller, this, Map.of(), List.of(), List.of()); - this.gameCard = new GameCard(controller, this); + MenuCard menuCard = new MenuCard(controller, this, resourceGetter); + GamePlayCard guideCard = new GuideCard(controller, this, Map.of(), List.of(), List.of()); + GamePlayCard gameCard = new GameCard(controller, this); deck.add(ViewCards.GUIDE.getStringId(), guideCard); layout.addLayoutComponent(guideCard, ViewCards.GUIDE.getStringId());