@Override
    public int pulse() {
        if (game.getGameState() == GameState.LOGIN) {
            if (!clicked) {
                mouse.click(userRect.x, userRect.y, userRect.x + userRect.width, userRect.y + userRect.height);
                clicked = true;
                sleep(1000, 1500);
            } else {
                log("Logging in...");
                Account account = getContext().getAccount();
                keyboard.type(account.getUsername(), true);
                sleep(500, 1200);
                keyboard.type(account.getPassword(), true);
                sleep(4000, 8000);
            }
        } else if (game.getGameState() == GameState.INGAME) {
            requestExit();
        }
        return 500;
    }