Loading src/main/java/Shape/ObstacleField.java +4 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,10 @@ public class ObstacleField { obstacleBounds.add(o.getShape().getBoundsInParent()); } public void removeField(Obstacle o){ obstacles.remove(o); } private int windowSize, obSize; private int xTranslation,yTranslation,zTranslation; Set<String> occupiedPositions = new HashSet<>(); Loading src/main/java/org/example/newmat/GraphicsAndWindowsTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,8 @@ public class GraphicsAndWindowsTest extends Application { ObstacleField obs = new ObstacleField(sceneWindow.getWindowSize(),sceneWindow.getXOffset(), sceneWindow.getYOffset(),300,-250, 1000, 0, "Box", Color.ORANGERED, false); sceneWindow.getYOffset(),300,0, 50, 100, "Box", Color.ORANGERED, true); String[] ob2 = {"--image", "src/teapot.txt", "--speed", "32", "--dir", "4,", "7,", "10"}; String[] ob3 = {"--image", "src/teapot.txt", "--speed", "5", "--dir", "1,", "1,", "1"}; Loading Loading @@ -349,6 +349,9 @@ public class GraphicsAndWindowsTest extends Application { switch ((String)collisionSide.get(0)){ case "REMOVABLE": Obstacle o = ((Obstacle) collisionSide.get(1)); group3D.getChildren().remove(o.getShape()); obs.removeField(o); score = score+5; break; case "LEFT": Loading target/classes/org/example/newmat/GraphicsAndWindowsTest$1.class +309 B (5.4 KiB) File changed.No diff preview for this file type. View original file View changed file Loading
src/main/java/Shape/ObstacleField.java +4 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,10 @@ public class ObstacleField { obstacleBounds.add(o.getShape().getBoundsInParent()); } public void removeField(Obstacle o){ obstacles.remove(o); } private int windowSize, obSize; private int xTranslation,yTranslation,zTranslation; Set<String> occupiedPositions = new HashSet<>(); Loading
src/main/java/org/example/newmat/GraphicsAndWindowsTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,8 @@ public class GraphicsAndWindowsTest extends Application { ObstacleField obs = new ObstacleField(sceneWindow.getWindowSize(),sceneWindow.getXOffset(), sceneWindow.getYOffset(),300,-250, 1000, 0, "Box", Color.ORANGERED, false); sceneWindow.getYOffset(),300,0, 50, 100, "Box", Color.ORANGERED, true); String[] ob2 = {"--image", "src/teapot.txt", "--speed", "32", "--dir", "4,", "7,", "10"}; String[] ob3 = {"--image", "src/teapot.txt", "--speed", "5", "--dir", "1,", "1,", "1"}; Loading Loading @@ -349,6 +349,9 @@ public class GraphicsAndWindowsTest extends Application { switch ((String)collisionSide.get(0)){ case "REMOVABLE": Obstacle o = ((Obstacle) collisionSide.get(1)); group3D.getChildren().remove(o.getShape()); obs.removeField(o); score = score+5; break; case "LEFT": Loading
target/classes/org/example/newmat/GraphicsAndWindowsTest$1.class +309 B (5.4 KiB) File changed.No diff preview for this file type. View original file View changed file