From 8f1b6afee5549c03c36376e41d0e299325ef6169 Mon Sep 17 00:00:00 2001 From: philippe lhardy Date: Sun, 4 Mar 2018 18:53:42 +0100 Subject: [PATCH] add a ground to labyrinth --- java/Makefile | 13 ++++++++----- java/org/artisanlogiciel/games/stl/Wall3d.java | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/java/Makefile b/java/Makefile index 4bc93ec..90904b5 100644 --- a/java/Makefile +++ b/java/Makefile @@ -1,21 +1,24 @@ PACKAGE=org.artisanlogiciel.games PACKAGE_DIR=$(subst .,/,$(PACKAGE)) -OUT=out +# maps with ant build.xml +OUT=../build # external libraries LIBS=../libs/artgaphics-0.1.0.jar EDITOR=emacs $(OUT): - mkdir -p $(OUT) + echo "[ERROR] Missing $(OUT)" +# mkdir -p $(OUT) clean: @find $(PACKAGE_DIR) -name "*.class" -type f -print0|xargs -0 rm 2>/dev/null && echo "cleaned classes in source" @find $(OUT) -name "*.class" -type f -print0|xargs -0 rm 2>/dev/null || echo "nothing to clean" test: - javac -cp $(LIBS) -d $(OUT) $(PACKAGE_DIR)/LabyModel.java - javac -cp $(LIBS) -d $(OUT) $(PACKAGE_DIR)/Main.java - java -cp $(OUT) $(PACKAGE).Main + echo "$(pwd)/$(PACKAGE_DIR)" + javac -sourcepath . -cp $(LIBS) -d $(OUT) $(PACKAGE_DIR)/LabyModel.java + javac -sourcepath . -cp $(LIBS) -d $(OUT) $(PACKAGE_DIR)/Main.java + java -cp $(OUT):$(LIBS):../lang $(PACKAGE).Main run/%: $(OUT) diff --git a/java/org/artisanlogiciel/games/stl/Wall3d.java b/java/org/artisanlogiciel/games/stl/Wall3d.java index 875f4a4..4a46149 100644 --- a/java/org/artisanlogiciel/games/stl/Wall3d.java +++ b/java/org/artisanlogiciel/games/stl/Wall3d.java @@ -28,6 +28,7 @@ public class Wall3d public final static Wall3d West = new Wall3d(1, 10, 10, 0, 0, 0); public final static Wall3d North = new Wall3d(10, 1, 10, 0, 10, 0); public final static Wall3d East = new Wall3d(1, 10, 10, 10, 0, 0); + public final static Wall3d Ground = new Wall3d(10, 10, 2, 0, 0, 0); int triangle[][][] = null; @@ -199,8 +200,10 @@ public class Wall3d { stream.write(new Wall3d(East, x * xl, y * yl, 0).toString().getBytes()); } + stream.write(new Wall3d(Ground, x * xl, y * yl, 0).toString().getBytes()); } } + stream.write("endsolid wall\n\n".getBytes()); }