public void handleClick(int button) {
        switch (button) {
            case 1:
                state = State.OBSTACLE;
                break;
            case 2:
                state = State.START;
                break;
            case 3:
                state = State.END;
                break;
            default:
                break;
        }
    }