From 167d898a3cfaf0c3016f7fccb257dd0035b42d17 Mon Sep 17 00:00:00 2001 From: Daniel Grigencha Date: Mon, 2 Dec 2024 16:25:33 +0100 Subject: [PATCH] Updated 'StartNode' class. Updated the 'StartNode' class by reverting all enumerations to its origin types in it. --- .../model/src/main/java/pp/mdga/game/StartNode.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/game/StartNode.java b/Projekte/mdga/model/src/main/java/pp/mdga/game/StartNode.java index 23161ecf..24b2c267 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/game/StartNode.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/game/StartNode.java @@ -10,7 +10,7 @@ public class StartNode extends Node { /** * The color of the node. */ - private int color; + private Color color; /** * Creates a new start node with the given color. @@ -18,11 +18,11 @@ public class StartNode extends Node { * @param color the color of the node */ public StartNode(Color color) { - this.color = color.ordinal(); + this.color = color; } private StartNode() { - color = Color.NONE.ordinal(); + color = Color.NONE; } /** @@ -31,7 +31,7 @@ private StartNode() { * @return the color of the node */ public Color getColor() { - return Color.values()[color]; + return color; } /** @@ -40,6 +40,6 @@ public Color getColor() { * @param color the new color of the node */ public void setColor(Color color) { - this.color = color.ordinal(); + this.color = color; } }