Hacky-Quizbot/src/main/java/linux/general/hackyquizbot/QuizBackend.java

70 lines
1.6 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package linux.general.hackyquizbot;
public class QuizBackend {
public static String[] getCategories() {
return null;
}
public static Question getRandomQuestionForCategory(String category) {
return null;
}
public static int getScoreForUser(String discordUserID) {
return 0;
}
public static class Question {
/**
*
* @param question The string for the question text
* @param answers The multiple choice answers
* @param mask A mask to be layed over answers to decide which answers are correct and which arent
*/
public Question(String question, String[] answers, boolean[] mask) {
}
/**
* @return the full question text including multiple choice options with letters that correspond to getValidResponses()
*/
public String getQuestionTextWithOptions() {
return null;
}
/**
* @return a character array containing all the valid answers
*/
public char[] getValidResponses() {
return null;
}
public char[] getCorrectResponses() {
return null;
}
/**
* This is used to send the users reply back to the backend. Can be called
* multiple times to add answers for questions with multiple possible answers.
*
* @param discordUserID
* @param answer
*/
public void addAnswer(String discordUserID, char answer) {
}
/**
* Used to balance easy and difficult questions. Difficult questions will have a
* higher value so if someone gets a bunch of them they will get less questions
* overall.
*
* @return
*/
public int getQuestionScoreValue() {
return 0;
}
}
}