aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/los/numeros/ExampleGame
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/los/numeros/ExampleGame')
-rw-r--r--src/main/java/los/numeros/ExampleGame/Main.java20
-rw-r--r--src/main/java/los/numeros/ExampleGame/modules/ExampleModule.java17
2 files changed, 37 insertions, 0 deletions
diff --git a/src/main/java/los/numeros/ExampleGame/Main.java b/src/main/java/los/numeros/ExampleGame/Main.java
new file mode 100644
index 0000000..eb515c6
--- /dev/null
+++ b/src/main/java/los/numeros/ExampleGame/Main.java
@@ -0,0 +1,20 @@
+package los.numeros.ExampleGame;
+
+import java.util.function.BooleanSupplier;
+
+import los.numeros.ExampleGame.modules.*;
+import los.numeros.GameEngine.Engine;
+import los.numeros.GameEngine.Module;
+
+public class Main implements Engine {
+ BooleanSupplier running = () -> true;
+ Module modules[];
+
+ public Main() {
+ /* put the modules in an array */
+ modules[modules.length] = new ExampleModule();
+
+ /* start the game */
+ Engine.StartEngine(running, modules);
+ }
+}
diff --git a/src/main/java/los/numeros/ExampleGame/modules/ExampleModule.java b/src/main/java/los/numeros/ExampleGame/modules/ExampleModule.java
new file mode 100644
index 0000000..9ab3179
--- /dev/null
+++ b/src/main/java/los/numeros/ExampleGame/modules/ExampleModule.java
@@ -0,0 +1,17 @@
+package los.numeros.ExampleGame.modules;
+
+import los.numeros.GameEngine.Module;
+
+public class ExampleModule implements Module {
+ @Override
+ public int init()
+ {
+ return 0;
+ }
+
+ @Override
+ public int end()
+ {
+ return 0;
+ }
+}