|
@ -1,7 +1,9 @@ |
|
|
package base; |
|
|
package base; |
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
import playground.LevelMovingObjects; |
|
|
|
|
|
|
|
|
import org.apache.logging.log4j.LogManager; |
|
|
|
|
|
import org.apache.logging.log4j.Logger; |
|
|
|
|
|
import playground.*; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* main class to start a game with only one level {@link playground.LevelMovingObjects}. |
|
|
* main class to start a game with only one level {@link playground.LevelMovingObjects}. |
|
@ -9,6 +11,8 @@ import playground.LevelMovingObjects; |
|
|
*/ |
|
|
*/ |
|
|
public class MovingObjectsGame extends GameLoop { |
|
|
public class MovingObjectsGame extends GameLoop { |
|
|
|
|
|
|
|
|
|
|
|
private static Logger logger = LogManager.getLogger(MovingObjectsGame.class); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* starts this game. |
|
|
* starts this game. |
|
|
* |
|
|
* |
|
@ -17,6 +21,7 @@ public class MovingObjectsGame extends GameLoop { |
|
|
* thrown (and game ends). |
|
|
* thrown (and game ends). |
|
|
*/ |
|
|
*/ |
|
|
public static void main(String[] args) throws IOException { |
|
|
public static void main(String[] args) throws IOException { |
|
|
|
|
|
logger.info("Starting Game Program...let's play and don't get hit!"); |
|
|
GameLoop myGame = new MovingObjectsGame(); |
|
|
GameLoop myGame = new MovingObjectsGame(); |
|
|
myGame.runGame(args); |
|
|
myGame.runGame(args); |
|
|
} |
|
|
} |
|
@ -27,7 +32,7 @@ public class MovingObjectsGame extends GameLoop { |
|
|
@Override |
|
|
@Override |
|
|
public void defineLevels() { |
|
|
public void defineLevels() { |
|
|
this.resetLevels(); |
|
|
this.resetLevels(); |
|
|
this.addLevel(new LevelMovingObjects()); |
|
|
|
|
|
|
|
|
this.addLevel(new LevelMovingHitObjects()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |