Skip to content

Commit

Permalink
Changed to for instead of forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
bagarozzi committed Jul 9, 2024
1 parent 5b82029 commit be5dc19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/it/unibo/bombardero/view/GamePlayCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ public void paintComponent(final Graphics g) {
);
});
/* Drawing the player and the enemies */
charactersImages.entrySet().forEach(enemy -> {
for (final Entry<Character, SpriteImageCombo> 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(
Expand Down

0 comments on commit be5dc19

Please sign in to comment.