From 21d54ac978e4184182f66aa5f8b322330ef16954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Daleng?= <142524365+MrMarHVD@users.noreply.github.com> Date: Thu, 4 Apr 2024 19:31:48 +0200 Subject: [PATCH] Preparing to push. --- .../ntnu/stud/chaosgame/controller/game/ChaosGame.java | 1 + .../{controller/game => view}/ChaosGameObserver.java | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) rename src/main/java/edu/ntnu/stud/chaosgame/{controller/game => view}/ChaosGameObserver.java (72%) diff --git a/src/main/java/edu/ntnu/stud/chaosgame/controller/game/ChaosGame.java b/src/main/java/edu/ntnu/stud/chaosgame/controller/game/ChaosGame.java index 09c1d60..56f7636 100644 --- a/src/main/java/edu/ntnu/stud/chaosgame/controller/game/ChaosGame.java +++ b/src/main/java/edu/ntnu/stud/chaosgame/controller/game/ChaosGame.java @@ -1,6 +1,7 @@ package edu.ntnu.stud.chaosgame.controller.game; import edu.ntnu.stud.chaosgame.model.data.Vector2D; +import edu.ntnu.stud.chaosgame.view.ChaosGameObserver; import java.util.ArrayList; import java.util.Arrays; import java.util.Random; diff --git a/src/main/java/edu/ntnu/stud/chaosgame/controller/game/ChaosGameObserver.java b/src/main/java/edu/ntnu/stud/chaosgame/view/ChaosGameObserver.java similarity index 72% rename from src/main/java/edu/ntnu/stud/chaosgame/controller/game/ChaosGameObserver.java rename to src/main/java/edu/ntnu/stud/chaosgame/view/ChaosGameObserver.java index e04a44d..24ab6a3 100644 --- a/src/main/java/edu/ntnu/stud/chaosgame/controller/game/ChaosGameObserver.java +++ b/src/main/java/edu/ntnu/stud/chaosgame/view/ChaosGameObserver.java @@ -1,4 +1,6 @@ -package edu.ntnu.stud.chaosgame.controller.game; +package edu.ntnu.stud.chaosgame.view; + +import edu.ntnu.stud.chaosgame.controller.game.ChaosGame; /** * Observer interface for monitoring changes to the active @@ -7,6 +9,7 @@ package edu.ntnu.stud.chaosgame.controller.game; public interface ChaosGameObserver { // TODO: Create interface + /** * Perform update of the ChaosCanvas. * @@ -21,5 +24,10 @@ public interface ChaosGameObserver { */ //void updateDescription(ChaosGameDescription description); + /** + * Update the observer based on changes to the chaos game. + * + * @param game the game this observer is monitoring. + */ void update(ChaosGame game); } -- GitLab