package holo.bolt;

import holo.bolt.states.*;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

public class BoltMain extends StateBasedGame
{
	public static final int MAIN_MENU_ID = 0;
	public static final int GAME_ID = 1;
	public static final int GAME_OVER_ID = 2;
	public static final int VICTORY_ID = 3;
	public static final int HELP_ID = 4;
	
	public static int ScreenWidth;
	public static int ScreenHeight;
	
	public BoltMain()
	{
		super("Bolt");
	}
	
	public static void main(String[] args) throws SlickException 
	{
		final BoltMain game = new BoltMain();
		AppGameContainer app = new AppGameContainer(game);

		ScreenWidth = 876;
		ScreenHeight = 480;
		
		app.setDisplayMode(ScreenWidth, ScreenHeight, false);

		app.setVSync(true);
		app.setUpdateOnlyWhenVisible(false);
		app.setShowFPS(false);

		Runtime.getRuntime().addShutdownHook(new Thread() 
		{
			public void run() 
			{ 
				//shutdown thread
			}
		});

		app.start();
	}

	@Override
	public void initStatesList(GameContainer gc) throws SlickException
	{
		this.addState(new MainMenuState());
		this.addState(new GameState());
		this.addState(new GameOverState());
		this.addState(new HelpState());
		this.addState(new VictoryState());
	}
	
}
