LibreTrivia icon indicating copy to clipboard operation
LibreTrivia copied to clipboard

how to set TriviaDifficulty programmable ?

Open sahujaunpuri opened this issue 5 years ago • 1 comments

how to set TriviaDifficulty programmable ? like i want as

String resultDifficulty = ""; if (datapoints<=200 ){ resultDifficulty = "EASY"; } if (datapoints>201 ){ resultDifficulty = "MEDIUM"; } if (datapoints>=500 ){ resultDifficulty = "HARD"; }

but wen use this as

TriviaQuery query = new TriviaQuery.Builder(amount) .category(TriviaCategory.GENERAL_KNOWLEDGE) //.difficulty(TriviaDifficulty.EASY) .difficulty(resultDifficulty) .build();

. get error as game

Will you help me ?

sahujaunpuri avatar May 22 '19 20:05 sahujaunpuri

I think resultDifficulty of the wrong type and it should be something like TriviaDifficulty.EASY (of type TriviaDifficulty) instead of the string "EASY".

lgommans avatar Jan 02 '20 21:01 lgommans