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; } }