From 57aad8efb6518b499a2df23a8a60ef76c90cc3f0 Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Thu, 8 Feb 2024 21:28:23 +0100 Subject: [PATCH] refactoring cleanup destroy Methode for PlayController --- .../java/de/hsfulda/onses/controllers/PlayerController.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/de/hsfulda/onses/controllers/PlayerController.java b/src/main/java/de/hsfulda/onses/controllers/PlayerController.java index 57d7078..4815e02 100644 --- a/src/main/java/de/hsfulda/onses/controllers/PlayerController.java +++ b/src/main/java/de/hsfulda/onses/controllers/PlayerController.java @@ -55,10 +55,7 @@ public class PlayerController implements Controller { @Override public void destroy() { - int i = 0; - - while(i < controllers.size()) { - Controller controller = controllers.get(i++); + for (Controller controller : controllers) { controller.destroy(); } }