// Path: core/src/nkarasch/chessgdx/GameCore.java
// public class GameCore implements ApplicationListener {
// 
// 	public static final String TITLE = "ChessGDX";
// 
// 	private Camera mCameraController;
// 	private ChessLogicController mLogicController;
// 	private BoardController mBoardController;
// 	private PerspectiveRenderer mPerspectiveRenderer;
// 	private OverlayRenderer mOverlayRenderer;
// 
// 	private static Runnable rebootHook;
// 
// 	/**
// 	 * @param rebootHook
// 	 *            game restart hook
// 	 */
// 	public GameCore(final Runnable rebootHook) {
// 		GameCore.rebootHook = rebootHook;
// 	}
// 
// 	@Override
// 	public void create() {
// 		GraphicsSettings.setGraphics();
// 		mCameraController = new Camera();
// 		mOverlayRenderer = new OverlayRenderer(this);
// 		mLogicController = new ChessLogicController(mOverlayRenderer);
// 		mBoardController = new BoardController(mCameraController, mLogicController, mOverlayRenderer);
// 		mPerspectiveRenderer = new PerspectiveRenderer(mCameraController, mBoardController, mLogicController.getPlacement());
// 
// 		Gdx.input.setInputProcessor(new InputMultiplexer(mOverlayRenderer, mBoardController, mCameraController.getOrbitController()));
// 	}
// 
// 	@Override
// 	public void render() {
// 		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
// 		mCameraController.update();
// 		mPerspectiveRenderer.render();
// 		mOverlayRenderer.render();
// 	}
// 
// 	@Override
// 	public void resize(int width, int height) {
// 		// requiring restart on resize instead, this would be tedious to set up
// 	}
// 
// 	@Override
// 	public void pause() {
// 		// not supporting mobile
// 	}
// 
// 	@Override
// 	public void resume() {
// 		// not supporting mobile
// 	}
// 
// 	@Override
// 	public void dispose() {
// 		AssetHandler.getInstance().dispose();
// 		mLogicController.dispose();
// 		mOverlayRenderer.dispose();
// 	}
// 
// 	/**
// 	 * Restarts game client
// 	 */
// 	public static void restart() {
// 		Gdx.app.postRunnable(GameCore.rebootHook);
// 	}
// 
// 	/**
// 	 * Restores board back to the new game state
// 	 * 
// 	 * @param isWhite
// 	 *            player color
// 	 */
// 	public void newGame(boolean isWhite) {
// 		mBoardController.setPlayerColor(isWhite);
// 		mBoardController.resetList();
// 		mLogicController.resetPosition();
// 		mOverlayRenderer.getCheckmateDialog().setState(false, false);
// 		mOverlayRenderer.getMoveHistory().resetHistory();
// 	}
// }


import java.io.File;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import nkarasch.chessgdx.GameCore;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
package nkarasch.chessgdx.desktop;




public class DesktopLauncher {
	public static void main(String[] arg) {
		final LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
		cfg.title = "ChessGDX";
		cfg.width = 1920;
		cfg.height = 1080;
		cfg.backgroundFPS = 30;
		cfg.foregroundFPS = 0;
		cfg.vSyncEnabled = false;
		cfg.samples = 16;
		cfg.resizable = false;

		final Runnable rebootable = new Runnable() {
			@Override
			public void run() {
				if (Gdx.app != null) {
					Gdx.app.exit();
				}
				DesktopLauncher.restart(DesktopLauncher.class);
			}
		};

// Path: core/src/nkarasch/chessgdx/GameCore.java
// public class GameCore implements ApplicationListener {
// 
// 	public static final String TITLE = "ChessGDX";
// 
// 	private Camera mCameraController;
// 	private ChessLogicController mLogicController;
// 	private BoardController mBoardController;
// 	private PerspectiveRenderer mPerspectiveRenderer;
// 	private OverlayRenderer mOverlayRenderer;
// 
// 	private static Runnable rebootHook;
// 
// 	/**
// 	 * @param rebootHook
// 	 *            game restart hook
// 	 */
// 	public GameCore(final Runnable rebootHook) {
// 		GameCore.rebootHook = rebootHook;
// 	}
// 
// 	@Override
// 	public void create() {
// 		GraphicsSettings.setGraphics();
// 		mCameraController = new Camera();
// 		mOverlayRenderer = new OverlayRenderer(this);
// 		mLogicController = new ChessLogicController(mOverlayRenderer);
// 		mBoardController = new BoardController(mCameraController, mLogicController, mOverlayRenderer);
// 		mPerspectiveRenderer = new PerspectiveRenderer(mCameraController, mBoardController, mLogicController.getPlacement());
// 
// 		Gdx.input.setInputProcessor(new InputMultiplexer(mOverlayRenderer, mBoardController, mCameraController.getOrbitController()));
// 	}
// 
// 	@Override
// 	public void render() {
// 		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
// 		mCameraController.update();
// 		mPerspectiveRenderer.render();
// 		mOverlayRenderer.render();
// 	}
// 
// 	@Override
// 	public void resize(int width, int height) {
// 		// requiring restart on resize instead, this would be tedious to set up
// 	}
// 
// 	@Override
// 	public void pause() {
// 		// not supporting mobile
// 	}
// 
// 	@Override
// 	public void resume() {
// 		// not supporting mobile
// 	}
// 
// 	@Override
// 	public void dispose() {
// 		AssetHandler.getInstance().dispose();
// 		mLogicController.dispose();
// 		mOverlayRenderer.dispose();
// 	}
// 
// 	/**
// 	 * Restarts game client
// 	 */
// 	public static void restart() {
// 		Gdx.app.postRunnable(GameCore.rebootHook);
// 	}
// 
// 	/**
// 	 * Restores board back to the new game state
// 	 * 
// 	 * @param isWhite
// 	 *            player color
// 	 */
// 	public void newGame(boolean isWhite) {
// 		mBoardController.setPlayerColor(isWhite);
// 		mBoardController.resetList();
// 		mLogicController.resetPosition();
// 		mOverlayRenderer.getCheckmateDialog().setState(false, false);
// 		mOverlayRenderer.getMoveHistory().resetHistory();
// 	}
// }


// Path: desktop/src/nkarasch/chessgdx/desktop/DesktopLauncher.java
import java.io.File;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import nkarasch.chessgdx.GameCore;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;

package nkarasch.chessgdx.desktop;




public class DesktopLauncher {
	public static void main(String[] arg) {
		final LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
		cfg.title = "ChessGDX";
		cfg.width = 1920;
		cfg.height = 1080;
		cfg.backgroundFPS = 30;
		cfg.foregroundFPS = 0;
		cfg.vSyncEnabled = false;
		cfg.samples = 16;
		cfg.resizable = false;

		final Runnable rebootable = new Runnable() {
			@Override
			public void run() {
				if (Gdx.app != null) {
					Gdx.app.exit();
				}
				DesktopLauncher.restart(DesktopLauncher.class);
			}
		};

		new LwjglApplication(new GameCore(rebootable), cfg);