public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException {
		if(container.getInput().isKeyPressed(Keyboard.KEY_ESCAPE)){
			game.enterState(MenuState.ID);
		}
		if(!b.isGameOver()){
			TetrisRobot.findGhost();
			totalDelta += delta;
			if(FacebookBoard.isFound()){
				if(moved){
					b.setPiece(FacebookBoard.nextPiece);
					if(b.getPiece() != null)
						moved = false;
					return;
				}
				if(!moved){
					b.setBoard(TetrisRobot.parseBoard());
					Move m = MoveFinder.getBestMove(b, b.getPiece().clonePiece(), agent);
					if(m != null){
						TetrisRobot.rotate(-m.rot);
						if(3 < m.x){
							TetrisRobot.right(m.x-3);
						}else if(3 > m.x){
							TetrisRobot.left(3-m.x);
						}
						TetrisRobot.drop();
						b.getPiece().setRoation(m.rot);
						b.getPiece().setLocation(m.x, m.y);
						b.drop(true);
						totalDelta = 0;
						moved = true;
						b.setPiece(null);
					}
				}
			}
		}
	}