com.github.mathiewz.slick.util.Bootstrap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of modernized-slick Show documentation
Show all versions of modernized-slick Show documentation
The main purpose of this libraryis to modernize and maintain the slick2D library.
The newest version!
package com.github.mathiewz.slick.util;
import com.github.mathiewz.slick.AppGameContainer;
import com.github.mathiewz.slick.Game;
/**
* Utility class to wrap up starting a game in a single line
*
* @author kevin
*/
public class Bootstrap {
private Bootstrap() {
// To avoid instanciation
}
/**
* Start the game as an application
*
* @param game
* The game to be started
* @param width
* The width of the window
* @param height
* The height of the window
* @param fullscreen
* True if the window should be fullscreen
*/
public static void runAsApplication(Game game, int width, int height, boolean fullscreen) {
try {
AppGameContainer container = new AppGameContainer(game, width, height, fullscreen);
container.start();
} catch (Exception e) {
Log.error(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy