Implement trivia welcome screen with category picker
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package wtf.beatrice.hidekobot.objects.comparators;
|
||||
|
||||
import wtf.beatrice.hidekobot.objects.fun.TriviaCategory;
|
||||
import wtf.beatrice.hidekobot.objects.fun.TriviaScore;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* This class gets two trivia categories, and compares them by their name.
|
||||
*/
|
||||
public class TriviaCategoryComparator implements Comparator<TriviaCategory> {
|
||||
|
||||
@Override
|
||||
public int compare(TriviaCategory o1, TriviaCategory o2) {
|
||||
return CharSequence.compare(o1.categoryName(), o2.categoryName());
|
||||
}
|
||||
}
|
@@ -1,10 +1,8 @@
|
||||
package wtf.beatrice.hidekobot.objects.comparators;
|
||||
|
||||
import wtf.beatrice.hidekobot.objects.TriviaScore;
|
||||
import wtf.beatrice.hidekobot.objects.fun.TriviaScore;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class gets two trivia scores, and compares their score.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package wtf.beatrice.hidekobot.objects;
|
||||
package wtf.beatrice.hidekobot.objects.fun;
|
||||
|
||||
import wtf.beatrice.hidekobot.util.RandomUtil;
|
||||
|
@@ -0,0 +1,5 @@
|
||||
package wtf.beatrice.hidekobot.objects.fun;
|
||||
|
||||
public record TriviaCategory(String categoryName, int categoryId) {
|
||||
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package wtf.beatrice.hidekobot.objects;
|
||||
package wtf.beatrice.hidekobot.objects.fun;
|
||||
|
||||
import java.util.List;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package wtf.beatrice.hidekobot.objects;
|
||||
package wtf.beatrice.hidekobot.objects.fun;
|
||||
|
||||
import net.dv8tion.jda.api.entities.User;
|
||||
|
Reference in New Issue
Block a user