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