-
Notifications
You must be signed in to change notification settings - Fork 0
TinyTank
This file is the root of the file system and as such contains the main. The game is implementing a Slick2d StateBasedGame for this project, therefore this file extends the superclass StateBasedGame.
This is an static integer that holds the value of the previous state. This should be set when exiting a state so the next state can act accordingly.
Every java program has one. This one initialize the container for the game. This is done with the line AppGameContainer app = new AppGameContainer(new TinyTank(""));
. The program then initializes some parameters of the container and starts the game.
Part of the background work that slick does in a StateBasedGame is maintain different game states. This function initializes the states. To make things easier, this project has a STATES enumeration with all the states enumerated. As such, this function just grabs the values and uses an enhanced for loop to iterate over and initialize them.
See: Source