From 88d86ed186bc3ff389d60f839becfe45af2ec169 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Sun, 4 Oct 2020 23:04:23 +0200 Subject: [PATCH] Refactor package structure some more. --- src/main/java/ch/fritteli/labyrinth/Main.java | 3 ++- .../java/ch/fritteli/labyrinth/{ => model}/Direction.java | 2 +- .../java/ch/fritteli/labyrinth/{ => model}/Labyrinth.java | 2 +- .../java/ch/fritteli/labyrinth/{ => model}/Position.java | 2 +- src/main/java/ch/fritteli/labyrinth/{ => model}/Tile.java | 2 +- .../java/ch/fritteli/labyrinth/{ => model}/Walls.java | 2 +- .../java/ch/fritteli/labyrinth/renderer/Renderer.java | 2 +- .../ch/fritteli/labyrinth/renderer/html/Generator.java | 6 +++--- .../ch/fritteli/labyrinth/renderer/html/HTMLRenderer.java | 2 +- .../labyrinth/renderer/htmlfile/HTMLFileRenderer.java | 2 +- .../ch/fritteli/labyrinth/renderer/pdf/Generator.java | 8 ++++---- .../ch/fritteli/labyrinth/renderer/pdf/PDFRenderer.java | 2 +- .../labyrinth/renderer/pdffile/PDFFileRenderer.java | 4 ++-- .../ch/fritteli/labyrinth/renderer/text/Generator.java | 6 +++--- .../ch/fritteli/labyrinth/renderer/text/TextRenderer.java | 2 +- .../labyrinth/renderer/textfile/TextFileRenderer.java | 2 +- 16 files changed, 25 insertions(+), 24 deletions(-) rename src/main/java/ch/fritteli/labyrinth/{ => model}/Direction.java (96%) rename src/main/java/ch/fritteli/labyrinth/{ => model}/Labyrinth.java (99%) rename src/main/java/ch/fritteli/labyrinth/{ => model}/Position.java (73%) rename src/main/java/ch/fritteli/labyrinth/{ => model}/Tile.java (97%) rename src/main/java/ch/fritteli/labyrinth/{ => model}/Walls.java (97%) diff --git a/src/main/java/ch/fritteli/labyrinth/Main.java b/src/main/java/ch/fritteli/labyrinth/Main.java index 0a34a46..e62d6d3 100644 --- a/src/main/java/ch/fritteli/labyrinth/Main.java +++ b/src/main/java/ch/fritteli/labyrinth/Main.java @@ -1,10 +1,11 @@ package ch.fritteli.labyrinth; +import ch.fritteli.labyrinth.model.Labyrinth; import ch.fritteli.labyrinth.renderer.html.HTMLRenderer; import ch.fritteli.labyrinth.renderer.htmlfile.HTMLFileRenderer; import ch.fritteli.labyrinth.renderer.pdffile.PDFFileRenderer; -import ch.fritteli.labyrinth.renderer.textfile.TextFileRenderer; import ch.fritteli.labyrinth.renderer.text.TextRenderer; +import ch.fritteli.labyrinth.renderer.textfile.TextFileRenderer; import lombok.NonNull; import java.nio.file.Path; diff --git a/src/main/java/ch/fritteli/labyrinth/Direction.java b/src/main/java/ch/fritteli/labyrinth/model/Direction.java similarity index 96% rename from src/main/java/ch/fritteli/labyrinth/Direction.java rename to src/main/java/ch/fritteli/labyrinth/model/Direction.java index f9d3b76..c7c83d8 100644 --- a/src/main/java/ch/fritteli/labyrinth/Direction.java +++ b/src/main/java/ch/fritteli/labyrinth/model/Direction.java @@ -1,4 +1,4 @@ -package ch.fritteli.labyrinth; +package ch.fritteli.labyrinth.model; import lombok.NonNull; diff --git a/src/main/java/ch/fritteli/labyrinth/Labyrinth.java b/src/main/java/ch/fritteli/labyrinth/model/Labyrinth.java similarity index 99% rename from src/main/java/ch/fritteli/labyrinth/Labyrinth.java rename to src/main/java/ch/fritteli/labyrinth/model/Labyrinth.java index c3c780c..68bc87b 100644 --- a/src/main/java/ch/fritteli/labyrinth/Labyrinth.java +++ b/src/main/java/ch/fritteli/labyrinth/model/Labyrinth.java @@ -1,4 +1,4 @@ -package ch.fritteli.labyrinth; +package ch.fritteli.labyrinth.model; import io.vavr.control.Option; import lombok.Getter; diff --git a/src/main/java/ch/fritteli/labyrinth/Position.java b/src/main/java/ch/fritteli/labyrinth/model/Position.java similarity index 73% rename from src/main/java/ch/fritteli/labyrinth/Position.java rename to src/main/java/ch/fritteli/labyrinth/model/Position.java index 7860b1a..cec502a 100644 --- a/src/main/java/ch/fritteli/labyrinth/Position.java +++ b/src/main/java/ch/fritteli/labyrinth/model/Position.java @@ -1,4 +1,4 @@ -package ch.fritteli.labyrinth; +package ch.fritteli.labyrinth.model; import lombok.Value; import lombok.With; diff --git a/src/main/java/ch/fritteli/labyrinth/Tile.java b/src/main/java/ch/fritteli/labyrinth/model/Tile.java similarity index 97% rename from src/main/java/ch/fritteli/labyrinth/Tile.java rename to src/main/java/ch/fritteli/labyrinth/model/Tile.java index 5516b86..8182607 100644 --- a/src/main/java/ch/fritteli/labyrinth/Tile.java +++ b/src/main/java/ch/fritteli/labyrinth/model/Tile.java @@ -1,4 +1,4 @@ -package ch.fritteli.labyrinth; +package ch.fritteli.labyrinth.model; import io.vavr.collection.Stream; import io.vavr.control.Option; diff --git a/src/main/java/ch/fritteli/labyrinth/Walls.java b/src/main/java/ch/fritteli/labyrinth/model/Walls.java similarity index 97% rename from src/main/java/ch/fritteli/labyrinth/Walls.java rename to src/main/java/ch/fritteli/labyrinth/model/Walls.java index 15705c4..78f82f4 100644 --- a/src/main/java/ch/fritteli/labyrinth/Walls.java +++ b/src/main/java/ch/fritteli/labyrinth/model/Walls.java @@ -1,4 +1,4 @@ -package ch.fritteli.labyrinth; +package ch.fritteli.labyrinth.model; import io.vavr.collection.Stream; import lombok.NonNull; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/Renderer.java b/src/main/java/ch/fritteli/labyrinth/renderer/Renderer.java index 865522b..d1e04f7 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/Renderer.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/Renderer.java @@ -1,6 +1,6 @@ package ch.fritteli.labyrinth.renderer; -import ch.fritteli.labyrinth.Labyrinth; +import ch.fritteli.labyrinth.model.Labyrinth; import lombok.NonNull; public interface Renderer { diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/html/Generator.java b/src/main/java/ch/fritteli/labyrinth/renderer/html/Generator.java index fb21d59..40f69eb 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/html/Generator.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/html/Generator.java @@ -1,8 +1,8 @@ package ch.fritteli.labyrinth.renderer.html; -import ch.fritteli.labyrinth.Direction; -import ch.fritteli.labyrinth.Labyrinth; -import ch.fritteli.labyrinth.Tile; +import ch.fritteli.labyrinth.model.Direction; +import ch.fritteli.labyrinth.model.Labyrinth; +import ch.fritteli.labyrinth.model.Tile; import io.vavr.collection.HashSet; import io.vavr.collection.Set; import lombok.AccessLevel; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/html/HTMLRenderer.java b/src/main/java/ch/fritteli/labyrinth/renderer/html/HTMLRenderer.java index 173a4f1..706c694 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/html/HTMLRenderer.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/html/HTMLRenderer.java @@ -1,6 +1,6 @@ package ch.fritteli.labyrinth.renderer.html; -import ch.fritteli.labyrinth.Labyrinth; +import ch.fritteli.labyrinth.model.Labyrinth; import ch.fritteli.labyrinth.renderer.Renderer; import lombok.NonNull; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/htmlfile/HTMLFileRenderer.java b/src/main/java/ch/fritteli/labyrinth/renderer/htmlfile/HTMLFileRenderer.java index c7b2629..3540848 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/htmlfile/HTMLFileRenderer.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/htmlfile/HTMLFileRenderer.java @@ -1,6 +1,6 @@ package ch.fritteli.labyrinth.renderer.htmlfile; -import ch.fritteli.labyrinth.Labyrinth; +import ch.fritteli.labyrinth.model.Labyrinth; import ch.fritteli.labyrinth.renderer.Renderer; import ch.fritteli.labyrinth.renderer.html.HTMLRenderer; import lombok.NonNull; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/pdf/Generator.java b/src/main/java/ch/fritteli/labyrinth/renderer/pdf/Generator.java index 62b0922..de6ee62 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/pdf/Generator.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/pdf/Generator.java @@ -1,9 +1,9 @@ package ch.fritteli.labyrinth.renderer.pdf; -import ch.fritteli.labyrinth.Direction; -import ch.fritteli.labyrinth.Labyrinth; -import ch.fritteli.labyrinth.Position; -import ch.fritteli.labyrinth.Tile; +import ch.fritteli.labyrinth.model.Direction; +import ch.fritteli.labyrinth.model.Labyrinth; +import ch.fritteli.labyrinth.model.Position; +import ch.fritteli.labyrinth.model.Tile; import lombok.NonNull; import lombok.RequiredArgsConstructor; import lombok.Value; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/pdf/PDFRenderer.java b/src/main/java/ch/fritteli/labyrinth/renderer/pdf/PDFRenderer.java index 84f2e68..f9fe963 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/pdf/PDFRenderer.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/pdf/PDFRenderer.java @@ -1,6 +1,6 @@ package ch.fritteli.labyrinth.renderer.pdf; -import ch.fritteli.labyrinth.Labyrinth; +import ch.fritteli.labyrinth.model.Labyrinth; import ch.fritteli.labyrinth.renderer.Renderer; import lombok.NonNull; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/pdffile/PDFFileRenderer.java b/src/main/java/ch/fritteli/labyrinth/renderer/pdffile/PDFFileRenderer.java index 617dcf1..af82c07 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/pdffile/PDFFileRenderer.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/pdffile/PDFFileRenderer.java @@ -1,8 +1,8 @@ package ch.fritteli.labyrinth.renderer.pdffile; -import ch.fritteli.labyrinth.Labyrinth; -import ch.fritteli.labyrinth.renderer.pdf.PDFRenderer; +import ch.fritteli.labyrinth.model.Labyrinth; import ch.fritteli.labyrinth.renderer.Renderer; +import ch.fritteli.labyrinth.renderer.pdf.PDFRenderer; import lombok.NonNull; import java.io.IOException; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/text/Generator.java b/src/main/java/ch/fritteli/labyrinth/renderer/text/Generator.java index 4294f60..65ae821 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/text/Generator.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/text/Generator.java @@ -1,8 +1,8 @@ package ch.fritteli.labyrinth.renderer.text; -import ch.fritteli.labyrinth.Direction; -import ch.fritteli.labyrinth.Labyrinth; -import ch.fritteli.labyrinth.Tile; +import ch.fritteli.labyrinth.model.Direction; +import ch.fritteli.labyrinth.model.Labyrinth; +import ch.fritteli.labyrinth.model.Tile; import lombok.AccessLevel; import lombok.NonNull; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/text/TextRenderer.java b/src/main/java/ch/fritteli/labyrinth/renderer/text/TextRenderer.java index d184085..d7fad29 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/text/TextRenderer.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/text/TextRenderer.java @@ -1,6 +1,6 @@ package ch.fritteli.labyrinth.renderer.text; -import ch.fritteli.labyrinth.Labyrinth; +import ch.fritteli.labyrinth.model.Labyrinth; import ch.fritteli.labyrinth.renderer.Renderer; import lombok.NonNull; diff --git a/src/main/java/ch/fritteli/labyrinth/renderer/textfile/TextFileRenderer.java b/src/main/java/ch/fritteli/labyrinth/renderer/textfile/TextFileRenderer.java index 416cd3a..51560a5 100644 --- a/src/main/java/ch/fritteli/labyrinth/renderer/textfile/TextFileRenderer.java +++ b/src/main/java/ch/fritteli/labyrinth/renderer/textfile/TextFileRenderer.java @@ -1,6 +1,6 @@ package ch.fritteli.labyrinth.renderer.textfile; -import ch.fritteli.labyrinth.Labyrinth; +import ch.fritteli.labyrinth.model.Labyrinth; import ch.fritteli.labyrinth.renderer.Renderer; import ch.fritteli.labyrinth.renderer.text.TextRenderer; import io.vavr.collection.List;