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.

33 lines
843 B

  1. package base;
  2. import java.io.IOException;
  3. import playground.LevelMovingObjects;
  4. /**
  5. * main class to start a game with only one level {@link playground.LevelMovingObjects}.
  6. *
  7. */
  8. public class MovingObjectsGame extends GameLoop {
  9. /**
  10. * starts this game.
  11. *
  12. * @param args command line parameters (forwarded to {@link GameLoop#runGame(String[])}).
  13. * @throws IOException if highscore.txt file cannot be written or accessed, the exception is
  14. * thrown (and game ends).
  15. */
  16. public static void main(String[] args) throws IOException {
  17. GameLoop myGame = new MovingObjectsGame();
  18. myGame.runGame(args);
  19. }
  20. /**
  21. * adds only one level to play ({@link playground.LevelMovingObjects}).
  22. */
  23. @Override
  24. public void defineLevels() {
  25. this.resetLevels();
  26. this.addLevel(new LevelMovingObjects());
  27. }
  28. }