Added a basic backend with stub functions to work against.
parent
22e0139466
commit
81ffecec6a
|
@ -0,0 +1,58 @@
|
||||||
|
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 {
|
||||||
|
public Question(String question, String[] answers) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the full question text including multiple choice options
|
||||||
|
*/
|
||||||
|
public String getQuestionTextWithOptions() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a character array containing all the valid answers
|
||||||
|
*/
|
||||||
|
public char[] getValidResponses() {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue