This commit is contained in:
parent
a95985e1ca
commit
5b2b6bffc4
26 changed files with 89 additions and 62 deletions
27
labyrinth-generator.iml
Normal file
27
labyrinth-generator.iml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
|
||||||
|
<output url="file://$MODULE_DIR$/target/classes" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.jetbrains:annotations:19.0.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.vavr:vavr:0.10.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.vavr:vavr-match:0.10.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.pdfbox:pdfbox:2.0.20" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.pdfbox:fontbox:2.0.20" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.1" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.1" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
2
pom.xml
2
pom.xml
|
@ -43,7 +43,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<mainClass>ch.fritteli.labyrinth.Main</mainClass>
|
<mainClass>ch.fritteli.labyrinth.generator.Main</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
<descriptorRefs>
|
<descriptorRefs>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package ch.fritteli.labyrinth;
|
package ch.fritteli.labyrinth.generator;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.net.TheListener;
|
import ch.fritteli.labyrinth.generator.net.TheListener;
|
||||||
import ch.fritteli.labyrinth.renderer.html.HTMLRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.html.HTMLRenderer;
|
||||||
import ch.fritteli.labyrinth.renderer.htmlfile.HTMLFileRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.htmlfile.HTMLFileRenderer;
|
||||||
import ch.fritteli.labyrinth.renderer.pdffile.PDFFileRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.pdffile.PDFFileRenderer;
|
||||||
import ch.fritteli.labyrinth.renderer.text.TextRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.text.TextRenderer;
|
||||||
import ch.fritteli.labyrinth.renderer.textfile.TextFileRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.textfile.TextFileRenderer;
|
||||||
import io.vavr.control.Option;
|
import io.vavr.control.Option;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
public enum Direction {
|
public enum Direction {
|
||||||
TOP,
|
TOP,
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import io.vavr.control.Option;
|
import io.vavr.control.Option;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
import lombok.Value;
|
import lombok.Value;
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import io.vavr.collection.Stream;
|
import io.vavr.collection.Stream;
|
||||||
import io.vavr.control.Option;
|
import io.vavr.control.Option;
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import io.vavr.collection.Stream;
|
import io.vavr.collection.Stream;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
|
@ -1,9 +1,9 @@
|
||||||
package ch.fritteli.labyrinth.net;
|
package ch.fritteli.labyrinth.generator.net;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.renderer.html.HTMLRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.html.HTMLRenderer;
|
||||||
import ch.fritteli.labyrinth.renderer.pdf.PDFRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.pdf.PDFRenderer;
|
||||||
import ch.fritteli.labyrinth.renderer.text.TextRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.text.TextRenderer;
|
||||||
import com.sun.net.httpserver.Headers;
|
import com.sun.net.httpserver.Headers;
|
||||||
import com.sun.net.httpserver.HttpServer;
|
import com.sun.net.httpserver.HttpServer;
|
||||||
import io.vavr.collection.HashMap;
|
import io.vavr.collection.HashMap;
|
|
@ -1,6 +1,6 @@
|
||||||
package ch.fritteli.labyrinth.renderer;
|
package ch.fritteli.labyrinth.generator.renderer;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
public interface Renderer<T> {
|
public interface Renderer<T> {
|
|
@ -1,8 +1,8 @@
|
||||||
package ch.fritteli.labyrinth.renderer.html;
|
package ch.fritteli.labyrinth.generator.renderer.html;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Direction;
|
import ch.fritteli.labyrinth.generator.model.Direction;
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.model.Tile;
|
import ch.fritteli.labyrinth.generator.model.Tile;
|
||||||
import io.vavr.collection.HashSet;
|
import io.vavr.collection.HashSet;
|
||||||
import io.vavr.collection.Set;
|
import io.vavr.collection.Set;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
|
@ -1,7 +1,7 @@
|
||||||
package ch.fritteli.labyrinth.renderer.html;
|
package ch.fritteli.labyrinth.generator.renderer.html;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.renderer.Renderer;
|
import ch.fritteli.labyrinth.generator.renderer.Renderer;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
public class HTMLRenderer implements Renderer<String> {
|
public class HTMLRenderer implements Renderer<String> {
|
|
@ -1,8 +1,8 @@
|
||||||
package ch.fritteli.labyrinth.renderer.htmlfile;
|
package ch.fritteli.labyrinth.generator.renderer.htmlfile;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.renderer.Renderer;
|
import ch.fritteli.labyrinth.generator.renderer.Renderer;
|
||||||
import ch.fritteli.labyrinth.renderer.html.HTMLRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.html.HTMLRenderer;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
|
@ -1,9 +1,9 @@
|
||||||
package ch.fritteli.labyrinth.renderer.pdf;
|
package ch.fritteli.labyrinth.generator.renderer.pdf;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Direction;
|
import ch.fritteli.labyrinth.generator.model.Direction;
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.model.Position;
|
import ch.fritteli.labyrinth.generator.model.Position;
|
||||||
import ch.fritteli.labyrinth.model.Tile;
|
import ch.fritteli.labyrinth.generator.model.Tile;
|
||||||
import io.vavr.control.Option;
|
import io.vavr.control.Option;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
|
@ -1,7 +1,7 @@
|
||||||
package ch.fritteli.labyrinth.renderer.pdf;
|
package ch.fritteli.labyrinth.generator.renderer.pdf;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.renderer.Renderer;
|
import ch.fritteli.labyrinth.generator.renderer.Renderer;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
public class PDFRenderer implements Renderer<byte[]> {
|
public class PDFRenderer implements Renderer<byte[]> {
|
|
@ -1,8 +1,8 @@
|
||||||
package ch.fritteli.labyrinth.renderer.pdffile;
|
package ch.fritteli.labyrinth.generator.renderer.pdffile;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.renderer.Renderer;
|
import ch.fritteli.labyrinth.generator.renderer.Renderer;
|
||||||
import ch.fritteli.labyrinth.renderer.pdf.PDFRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.pdf.PDFRenderer;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.renderer.text;
|
package ch.fritteli.labyrinth.generator.renderer.text;
|
||||||
|
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -1,8 +1,8 @@
|
||||||
package ch.fritteli.labyrinth.renderer.text;
|
package ch.fritteli.labyrinth.generator.renderer.text;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Direction;
|
import ch.fritteli.labyrinth.generator.model.Direction;
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.model.Tile;
|
import ch.fritteli.labyrinth.generator.model.Tile;
|
||||||
import io.vavr.control.Option;
|
import io.vavr.control.Option;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
|
@ -1,7 +1,7 @@
|
||||||
package ch.fritteli.labyrinth.renderer.text;
|
package ch.fritteli.labyrinth.generator.renderer.text;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.renderer.Renderer;
|
import ch.fritteli.labyrinth.generator.renderer.Renderer;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
public class TextRenderer implements Renderer<String> {
|
public class TextRenderer implements Renderer<String> {
|
|
@ -1,8 +1,8 @@
|
||||||
package ch.fritteli.labyrinth.renderer.textfile;
|
package ch.fritteli.labyrinth.generator.renderer.textfile;
|
||||||
|
|
||||||
import ch.fritteli.labyrinth.model.Labyrinth;
|
import ch.fritteli.labyrinth.generator.model.Labyrinth;
|
||||||
import ch.fritteli.labyrinth.renderer.Renderer;
|
import ch.fritteli.labyrinth.generator.renderer.Renderer;
|
||||||
import ch.fritteli.labyrinth.renderer.text.TextRenderer;
|
import ch.fritteli.labyrinth.generator.renderer.text.TextRenderer;
|
||||||
import io.vavr.collection.List;
|
import io.vavr.collection.List;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import io.vavr.control.Option;
|
import io.vavr.control.Option;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.model;
|
package ch.fritteli.labyrinth.generator.model;
|
||||||
|
|
||||||
import io.vavr.collection.Stream;
|
import io.vavr.collection.Stream;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
|
@ -1,4 +1,4 @@
|
||||||
package ch.fritteli.labyrinth.renderer.text;
|
package ch.fritteli.labyrinth.generator.renderer.text;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
Loading…
Reference in a new issue