71 lines
1.6 KiB
Java
71 lines
1.6 KiB
Java
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 laid over answers to decide which answers are correct and which aren’t
|
||
* @param scoreValue See getQuestionScoreValue()
|
||
*/
|
||
public Question(String question, String[] answers, boolean[] mask, int scoreValue) {
|
||
|
||
}
|
||
|
||
/**
|
||
* @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 user’s 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;
|
||
}
|
||
}
|
||
}
|