From b135f3fa50b0398b2ecf7bae16d8420377bcba34 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Mon, 18 Nov 2024 05:51:31 +0100 Subject: [PATCH] idk --- .../pp/monopoly/client/gui/GameBoardSynchronizer.java | 6 ------ .../java/pp/monopoly/client/gui/MapViewSynchronizer.java | 9 +++++++++ .../model/src/main/java/pp/monopoly/model/Board.java | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GameBoardSynchronizer.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GameBoardSynchronizer.java index 56252a1..fe5e774 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GameBoardSynchronizer.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GameBoardSynchronizer.java @@ -7,7 +7,6 @@ package pp.monopoly.client.gui; -import com.jme3.effect.ParticleEmitter; import com.jme3.material.Material; import com.jme3.material.RenderState.BlendMode; import com.jme3.math.ColorRGBA; @@ -16,18 +15,13 @@ import com.jme3.scene.Geometry; import com.jme3.scene.Node; import com.jme3.scene.Spatial; import com.jme3.scene.shape.Box; -import com.jme3.scene.shape.Cylinder; -import groovyjarjarantlr4.v4.parse.ANTLRParser.finallyClause_return; import pp.monopoly.client.MonopolyApp; import pp.monopoly.game.server.PlayerColor; import pp.monopoly.model.Board; import pp.monopoly.model.Figure; -import pp.monopoly.model.Item; import pp.monopoly.model.Rotation; - -import static java.util.Objects.requireNonNull; import static pp.util.FloatMath.HALF_PI; import static pp.util.FloatMath.PI; diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/MapViewSynchronizer.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/MapViewSynchronizer.java index c239394..d7c3ff9 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/MapViewSynchronizer.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/MapViewSynchronizer.java @@ -1,5 +1,9 @@ package pp.monopoly.client.gui; +import com.jme3.scene.Spatial; + +import pp.monopoly.model.Figure; + /** * Synchronizes the visual representation of the board with the game model. * Handles updates for items on the board. @@ -33,4 +37,9 @@ class MapViewSynchronizer extends BoardSynchronizer { protected void disableState() { view.getNode().detachAllChildren(); // Entfernt alle visuellen Elemente vom Knoten } + + @Override + public Spatial visit(Figure figure) { + return figure.accept(this); + } } diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/Board.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/Board.java index e46308f..31ee634 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/Board.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/Board.java @@ -57,6 +57,7 @@ public class Board { this.width = width; this.height = height; this.eventBroker = eventBroker; + addItem(new Figure(5, 5, 5, Rotation.LEFT)); } /**