public void setDifficulty(TypeDifficultyKnownValues new_value)
    {
        TypeDifficulty new_full_value = new TypeDifficulty();

        Debug.Assert(new_value != TypeDifficultyKnownValues.Difficulty__none);
        new_full_value.in_known_list = true;
        new_full_value.list_value    = new_value;
        setDifficulty(new_full_value);
    }
    public static string  stringFromDifficulty(TypeDifficultyKnownValues the_enum)
    {
        switch (the_enum)
        {
        case TypeDifficultyKnownValues.Difficulty_Easy:
            return("Easy");

        case TypeDifficultyKnownValues.Difficulty_Hard:
            return("Hard");

        default:
            Debug.Assert(false);
            return(null);
        }
    }
            protected override void handle_result(string result)
            {
                TypeDifficultyKnownValues known     = stringToDifficulty(result);
                TypeDifficulty            new_value = new TypeDifficulty();

                if (known == TypeDifficultyKnownValues.Difficulty__none)
                {
                    new_value.in_known_list = false;
                    new_value.string_value  = result;
                }
                else
                {
                    new_value.in_known_list = true;
                    new_value.list_value    = known;
                }
                handle_result(new_value);
            }
    public void setDifficulty(string chars)
    {
        TypeDifficultyKnownValues known     = stringToDifficulty(chars);
        TypeDifficulty            new_value = new TypeDifficulty();

        if (known == TypeDifficultyKnownValues.Difficulty__none)
        {
            new_value.in_known_list = false;
            new_value.string_value  = chars;
        }
        else
        {
            new_value.in_known_list = true;
            new_value.list_value    = known;
        }
        setDifficulty(new_value);
    }