aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-25 15:37:57 +0900
committersyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-25 15:37:57 +0900
commit81a315f025f361d1155305e55dfee29308a74ed3 (patch)
tree9be59a599ef9821ca9e66005207cee32022e5a4f /src/main/java/kr/syeyoung/dungeonsguide/roomprocessor
parenta49e2c1970f6f77079a860dd5e92741251f41c9c (diff)
downloadSkyblock-Dungeons-Guide-81a315f025f361d1155305e55dfee29308a74ed3.tar.gz
Skyblock-Dungeons-Guide-81a315f025f361d1155305e55dfee29308a74ed3.tar.bz2
Skyblock-Dungeons-Guide-81a315f025f361d1155305e55dfee29308a74ed3.zip
room processor stuff
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomprocessor')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/DefaultRoomProcessor.java29
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java27
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java8
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorGenerator.java7
4 files changed, 71 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/DefaultRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/DefaultRoomProcessor.java
new file mode 100644
index 00000000..9edbcae9
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/DefaultRoomProcessor.java
@@ -0,0 +1,29 @@
+package kr.syeyoung.dungeonsguide.roomprocessor;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+
+public class DefaultRoomProcessor implements RoomProcessor {
+
+ public DefaultRoomProcessor(DungeonRoom dungeonRoom) {
+
+ }
+
+ @Override
+ public void tick() {
+
+ }
+
+ @Override
+ public void drawScreen() {
+
+ }
+
+ public static class Generator implements RoomProcessorGenerator<DefaultRoomProcessor> {
+ @Override
+ public DefaultRoomProcessor createNew(DungeonRoom dungeonRoom) {
+
+ DefaultRoomProcessor defaultRoomProcessor = new DefaultRoomProcessor(dungeonRoom);
+ return defaultRoomProcessor;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java
new file mode 100644
index 00000000..d404a1e4
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/ProcessorFactory.java
@@ -0,0 +1,27 @@
+package kr.syeyoung.dungeonsguide.roomprocessor;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+public class ProcessorFactory {
+ private static Map<String, RoomProcessorGenerator> map = new HashMap<String, RoomProcessorGenerator>();
+
+ public static RoomProcessorGenerator getRoomProcessorGenerator(String processorId) {
+ return map.get(processorId);
+ }
+
+ public static void registerRoomProcessor(String processorId, RoomProcessorGenerator generator) {
+ map.put(processorId, generator);
+ }
+
+ public static Set<String> getProcessors() {
+ return map.keySet();
+ }
+
+ static {
+ registerRoomProcessor("default", new DefaultRoomProcessor.Generator());
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java
new file mode 100644
index 00000000..24e29332
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessor.java
@@ -0,0 +1,8 @@
+package kr.syeyoung.dungeonsguide.roomprocessor;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+
+public interface RoomProcessor {
+ void tick();
+ void drawScreen();
+} \ No newline at end of file
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorGenerator.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorGenerator.java
new file mode 100644
index 00000000..66e97051
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorGenerator.java
@@ -0,0 +1,7 @@
+package kr.syeyoung.dungeonsguide.roomprocessor;
+
+import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
+
+public interface RoomProcessorGenerator<T extends RoomProcessor> {
+ T createNew(DungeonRoom dungeonRoom);
+}