From 32bc1b99866518bda03409dd8c81a2756656f44f Mon Sep 17 00:00:00 2001 From: Squibid Date: Mon, 3 Jun 2024 20:33:38 -0400 Subject: update game engine and example game --- src/main/java/los/numeros/gameEngine/Engine.java | 41 ------------------------ src/main/java/los/numeros/gameEngine/Module.java | 13 -------- 2 files changed, 54 deletions(-) delete mode 100644 src/main/java/los/numeros/gameEngine/Engine.java delete mode 100644 src/main/java/los/numeros/gameEngine/Module.java (limited to 'src/main/java/los/numeros/gameEngine') diff --git a/src/main/java/los/numeros/gameEngine/Engine.java b/src/main/java/los/numeros/gameEngine/Engine.java deleted file mode 100644 index ba09cf0..0000000 --- a/src/main/java/los/numeros/gameEngine/Engine.java +++ /dev/null @@ -1,41 +0,0 @@ -package los.numeros.gameEngine; - -import java.util.function.BooleanSupplier; - -public interface Engine { - public static int StartEngine(BooleanSupplier running, Module modules[]) - { - /* start game init tasks */ - GameStart(); - - /* run module inits */ - for (Module module : modules) { - module.init(); - } - - /* wait for the game to end */ - while (running.getAsBoolean()); - - /* run game end tasks */ - GameEnd(); - - /* run module ends */ - for (Module module : modules) { - module.end(); - } - - 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 deleted file mode 100644 index 0406615..0000000 --- a/src/main/java/los/numeros/gameEngine/Module.java +++ /dev/null @@ -1,13 +0,0 @@ -package los.numeros.gameEngine; - -public interface Module { - /** - * code to run when the game is started - */ - public int init(); - - /** - * code to run when the game has ended - */ - public int end(); -} -- cgit v1.2.1