You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

  1. package base;
  2. import java.io.IOException;
  3. import org.apache.logging.log4j.LogManager;
  4. import org.apache.logging.log4j.Logger;
  5. import playground.*;
  6. /**
  7. * main class to start a game with only one level {@link playground.LevelMovingObjects}.
  8. *
  9. */
  10. public class MovingObjectsGame extends GameLoop {
  11. private static Logger logger = LogManager.getLogger(MovingObjectsGame.class);
  12. /**
  13. * starts this game.
  14. *
  15. * @param args command line parameters (forwarded to {@link GameLoop#runGame(String[])}).
  16. * @throws IOException if highscore.txt file cannot be written or accessed, the exception is
  17. * thrown (and game ends).
  18. */
  19. public static void main(String[] args) throws IOException {
  20. logger.info("Starting Game Program...let's play and don't get hit!");
  21. GameLoop myGame = new MovingObjectsGame();
  22. myGame.runGame(args);
  23. }
  24. /**
  25. * adds only one level to play ({@link playground.LevelMovingObjects}).
  26. */
  27. @Override
  28. public void defineLevels() {
  29. this.resetLevels();
  30. this.addLevel(new LevelMovingHitObjects());
  31. }
  32. }