public void update(GameContainer container, StateBasedGame game, int g)
			throws SlickException {
		PistolCaveGame PC = (PistolCaveGame) game;
		Input input = container.getInput();
		
		//detect click of the connect button
		if(input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON)
				&& input.getAbsoluteMouseX() <= connectButton.getCoarseGrainedMaxX()
				&& input.getAbsoluteMouseX() >= connectButton.getCoarseGrainedMinX()
				&& input.getAbsoluteMouseY() <= connectButton.getCoarseGrainedMaxY()
				&& input.getAbsoluteMouseY() >= connectButton.getCoarseGrainedMinY()){

			PC.enterState(PistolCaveGame.PLAYINGSTATE);
		}
	}