diff options
author | Squibid <me@zacharyscheiman.com> | 2024-06-03 20:33:38 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2024-06-03 20:33:38 -0400 |
commit | 32bc1b99866518bda03409dd8c81a2756656f44f (patch) | |
tree | 06e47fd489bec72bf53450eeaa8540d016b245d2 /src/main/java/los/numeros | |
parent | 6aff7f52908188f42310b8574ef87ef9a720daf2 (diff) | |
download | lnm-32bc1b99866518bda03409dd8c81a2756656f44f.tar.gz lnm-32bc1b99866518bda03409dd8c81a2756656f44f.tar.bz2 lnm-32bc1b99866518bda03409dd8c81a2756656f44f.zip |
update game engine and example game
Diffstat (limited to '')
-rw-r--r-- | src/main/java/los/numeros/ExampleGame/Main.java (renamed from src/main/java/los/numeros/example/Main.java) | 8 | ||||
-rw-r--r-- | src/main/java/los/numeros/ExampleGame/modules/ExampleModule.java (renamed from src/main/java/los/numeros/example/modules/ExampleModule.java) | 4 | ||||
-rw-r--r-- | src/main/java/los/numeros/GameEngine/Engine.java (renamed from src/main/java/los/numeros/gameEngine/Engine.java) | 23 | ||||
-rw-r--r-- | src/main/java/los/numeros/GameEngine/Module.java (renamed from src/main/java/los/numeros/gameEngine/Module.java) | 2 |
4 files changed, 10 insertions, 27 deletions
diff --git a/src/main/java/los/numeros/example/Main.java b/src/main/java/los/numeros/ExampleGame/Main.java index 02fe35e..eb515c6 100644 --- a/src/main/java/los/numeros/example/Main.java +++ b/src/main/java/los/numeros/ExampleGame/Main.java @@ -1,10 +1,10 @@ -package los.numeros.example; +package los.numeros.ExampleGame; import java.util.function.BooleanSupplier; -import los.numeros.example.modules.*; -import los.numeros.gameEngine.Engine; -import los.numeros.gameEngine.Module; +import los.numeros.ExampleGame.modules.*; +import los.numeros.GameEngine.Engine; +import los.numeros.GameEngine.Module; public class Main implements Engine { BooleanSupplier running = () -> true; diff --git a/src/main/java/los/numeros/example/modules/ExampleModule.java b/src/main/java/los/numeros/ExampleGame/modules/ExampleModule.java index 0e2d103..9ab3179 100644 --- a/src/main/java/los/numeros/example/modules/ExampleModule.java +++ b/src/main/java/los/numeros/ExampleGame/modules/ExampleModule.java @@ -1,6 +1,6 @@ -package los.numeros.example.modules; +package los.numeros.ExampleGame.modules; -import los.numeros.gameEngine.Module; +import los.numeros.GameEngine.Module; public class ExampleModule implements Module { @Override diff --git a/src/main/java/los/numeros/gameEngine/Engine.java b/src/main/java/los/numeros/GameEngine/Engine.java index ba09cf0..2cc509a 100644 --- a/src/main/java/los/numeros/gameEngine/Engine.java +++ b/src/main/java/los/numeros/GameEngine/Engine.java @@ -1,13 +1,11 @@ -package los.numeros.gameEngine; +package los.numeros.GameEngine; import java.util.function.BooleanSupplier; public interface Engine { - public static int StartEngine(BooleanSupplier running, Module modules[]) + public static int + StartEngine(BooleanSupplier running, Module modules[]) { - /* start game init tasks */ - GameStart(); - /* run module inits */ for (Module module : modules) { module.init(); @@ -15,9 +13,6 @@ public interface Engine { /* wait for the game to end */ while (running.getAsBoolean()); - - /* run game end tasks */ - GameEnd(); /* run module ends */ for (Module module : modules) { @@ -26,16 +21,4 @@ public interface Engine { return 0; } - - public static int - GameStart() - { - return 0; - } - - public static int - GameEnd() - { - return 0; - } } diff --git a/src/main/java/los/numeros/gameEngine/Module.java b/src/main/java/los/numeros/GameEngine/Module.java index 0406615..53b8e5e 100644 --- a/src/main/java/los/numeros/gameEngine/Module.java +++ b/src/main/java/los/numeros/GameEngine/Module.java @@ -1,4 +1,4 @@ -package los.numeros.gameEngine; +package los.numeros.GameEngine; public interface Module { /** |