private static void update() throws IOException {
		GL11.glPushMatrix();
		if (gameState.equals("start")) {
			Handler.update();
			Handler.drawMenu("Start");
			if (Handler.getChoice()!=null) {
				switch (Handler.getChoice().getID()) {
				case "continue":
					System.out.println("continue");
					gameState = "inGame";
					map = new World();
					map.load("NewMap0");
					player = Player.fromFile("player");
					changeX(-player.getX()+WIDTH/2);
					break;
				case "load":
					gameState = "loadMaps";
					break;
				case "new":
					System.out.println("new");
					player = new Player(WIDTH/2,HEIGHT/2,"PNG","person3.png");
					friendly = new Friendly(WIDTH/3,HEIGHT+500);
					enemy = new Enemy(WIDTH/3,HEIGHT+500, "PNG", "enemy.png");
					map = new World("NewMap"+getMaps().length);
					gameState = "inGame";
					break;
				}
			}
		} else if (gameState.equals("loadMaps")) {
			Handler.drawMenu("Load");
			Handler.update();
			if (Handler.getChoice()!=null) {
				for (String s : getMaps()) {
					System.out.println(Handler.getChoice().getText()+","+s);
					if (Handler.getChoice().getText().equals(s)) {
						map = new World();
						map.load(s);
						player = Player.fromFile("player");
						gameState = "inGame";
					}
				}
			}
		} else {

			GL11.glTranslated(x,y,0);
			doGameLoop();
		}
		Display.sync(60);
		Display.update();
		GL11.glPopMatrix();
		GL11.glFinish();
	}