public static void restartGame() { drawCube = new Cube(); playerOne.currentPosition = null; playerTwo.currentPosition = null; switch (Config.convertSettingToInt("game", "starting_player")) { case 1: currentPlayer = playerOne; break; case 2: currentPlayer = playerTwo; break; } currentPlayer.getNewMoves(drawCube.cube); }
//sprivate static Color4 clearColour; //Used to draw spheres... Not sure why it's needed... //public static IntPtr intptr = GLU.NewQuadric(); /** * Initializes the Core of the program by initliazling everything. Failures here cause program termination */ public static void init() { Config.init(); Log.init(Config.convertSettingToInt("log", "default_level")); initGL(); Cube.init(); drawCube = new Cube(); playerOne = new Player(1, getPlayerType(1)); playerTwo = new Player(2, getPlayerType(2)); switch (Config.convertSettingToInt("game", "starting_player")) { case 1: currentPlayer = playerOne; break; case 2: currentPlayer = playerTwo; break; default: MainMethod.die("Core.init : The starting player must either be 1 or 2, not: " + Config.convertSettingToInt("game", "starting_player")); break; } numberGenerator = new Random(); simulating = Config.convertSettingToBool("game", "simulating"); simCount = 0; simCountMax = Config.convertSettingToInt("game", "sim_count"); State.setEvalFunc(); }