/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Game;

import javaPlay.GameEngine;

/**
 *
 * @author Jose Ricardo
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // Tela de Menu
        GameEngine.getInstance().addGameStateController(Globals.SCREEN_MENU,
                new MainMenuGameState());
        // Tela de jogo
        GameEngine.getInstance().addGameStateController(Globals.SCREEEN_PLAYING,
                new GamePlayState());

        // Tela inicial que será apresentada ao jogador
        GameEngine.getInstance().setStartingGameStateController(Globals.SCREEN_MENU);

        /* Garante a utilizacao da area requisitada para o desenho, levando em
         * conta as bordas inferiores e superiores
         */
        int realWidth = Globals.VIEWPORT_WIDTH +
     //           GameEngine.getInstance().getGameCanvas().getInsets().left +
                GameEngine.getInstance().getGameCanvas().getInsets().right;
        int realHeight = Globals.VIEWPORT_HEIGHT +
                GameEngine.getInstance().getGameCanvas().getInsets().top +
                GameEngine.getInstance().getGameCanvas().getInsets().bottom;
        GameEngine.getInstance().getGameCanvas().setSize(realWidth, realHeight);

        // Executar a engine
        GameEngine.getInstance().run();
    }

}
