Level Editor


Basic level editor created which currently supports one room.

ResistorKit Update

Updated ResistorKit so that it sets the next screen value to -1 by default instead of 0, which was a valid next screen state.  Created simple title screen, and added code to handle switch to the game screen.  This time I am using a List of Screens, instead of having each Screen declared as an instance variable in the main game class.  That way I am able to reference the next Screen as an index to the Screen list, instead of having a mess of if/then statements.  Added bounds checking for the screen array, just to ensure that the game doesn’t crash if the getNextScreen method returns a value higher than the Screen array size.

Level Editor

Created a simple graphical 2D array editor, which allows blocks to be placed in the array.  These will be used as the blocks of the game room.  Set the action button to save the current array.  Added a method to return the currently created level, or null if no level has been created.  When the player selects to start the game, then the main game loop checks to see if the world created by the level editor is not null.

Reworked a lot of the World, Level, and Map code so that it accepts those values as parameters.  This allows those to be created in the level editor, and then passed as a parameter to the GameScreen object, which holds a reference to the game world data object.  Added quite a few null checks, since initially the level or map may be null if no level has been created by the level editor.  Set the action button as the save button in the game level editor.