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.

34 lines
975 B

  1. package base;
  2. import java.io.IOException;
  3. import org.apache.logging.log4j.LogManager;
  4. import org.apache.logging.log4j.Logger;
  5. /**
  6. * main class to start a game with only one level.
  7. *
  8. */
  9. public class BreakoutGame extends GameLoop {
  10. private static Logger logger = LogManager.getLogger(BreakoutGame.class);
  11. public BreakoutGame() {
  12. this.levels.clear(); // removes Level1 added by superclass constructor
  13. // this.levels.add(new LevelBreakout1()); // FIXME add this when your level exists
  14. }
  15. /**
  16. * starts this game.
  17. *
  18. * @param args command line parameters (forwarded to {@link GameLoop#runGame(String[])}).
  19. * @throws IOException if highscore.txt file cannot be written or accessed, the exception is
  20. * thrown (and game ends).
  21. */
  22. public static void main(String[] args) throws IOException {
  23. GameLoop myGame = new BreakoutGame();
  24. logger.info("BreakoutGame program started.");
  25. myGame.runGame(args);
  26. }
  27. }