public void setState(int i) {
		lastState = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
		allowClick = false;

		previousState = currentState;
		unloadState(previousState);
		changing = true;
		currentState = i;
		game.jukeBox.play(game.jukeBox.tracks.transition);
		if (i == FIXSIZES) {
			gameStates[i] = new FixSizesState(game, this);
			gameStates[i].init();
		} else if (i == INTRO) {
			gameStates[i] = new IntroState(game, this, previousState);
			gameStates[i].init();
		} else if (i == MENU) {
			gameStates[i] = new MenuState(game, this, previousState);
			gameStates[i].init();
		} else if (i == PLAY) {
			gameStates[i] = new PlayState(game, this, previousState);
			gameStates[i].init();
		} else if (i == HELP) {
			gameStates[i] = new HelpState(game, this, previousState);
			gameStates[i].init();
		} else if (i == OPTION) {
			gameStates[i] = new OptionState(game, this, previousState);
			gameStates[i].init();
		} else if (i == CREDITS) {
			gameStates[i] = new CreditState(game, this, previousState);
			gameStates[i].init();
		}
	}