From be5dc199fabf7ece84e8b70b8da8cdaff70b481a Mon Sep 17 00:00:00 2001 From: Federico Bagattoni Date: Tue, 9 Jul 2024 22:05:21 +0200 Subject: [PATCH] Changed to for instead of forEach --- src/main/java/it/unibo/bombardero/view/GamePlayCard.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/it/unibo/bombardero/view/GamePlayCard.java b/src/main/java/it/unibo/bombardero/view/GamePlayCard.java index d1d59b99..72682c4b 100644 --- a/src/main/java/it/unibo/bombardero/view/GamePlayCard.java +++ b/src/main/java/it/unibo/bombardero/view/GamePlayCard.java @@ -257,10 +257,10 @@ public void paintComponent(final Graphics g) { ); }); /* Drawing the player and the enemies */ - charactersImages.entrySet().forEach(enemy -> { + for (final Entry enemy : charactersImages.entrySet()) { final Dimension enemyPos = resizingEngine.getCharacterPlacingPoint(enemy.getKey().getCharacterPosition()); g.drawImage(enemy.getValue().displayedImage(), enemyPos.width, enemyPos.height, null); - }); + } dyingCharactersMap.entrySet().forEach(entry -> { final Dimension pos = resizingEngine.getCharacterPlacingPoint(entry.getKey().getCharacterPosition()); g.drawImage(