mirror of
https://github.com/Noratrieb/killua-bot.git
synced 2026-01-16 16:15:03 +01:00
trivia add command
This commit is contained in:
parent
080c79b34b
commit
dac3b78f1c
11 changed files with 315 additions and 86 deletions
|
|
@ -24,5 +24,6 @@
|
||||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.1" level="project" />
|
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.1" level="project" />
|
||||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.1" level="project" />
|
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.1" level="project" />
|
||||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.1" level="project" />
|
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
5
pom.xml
5
pom.xml
|
|
@ -19,6 +19,11 @@
|
||||||
<artifactId>JDA</artifactId>
|
<artifactId>JDA</artifactId>
|
||||||
<version>4.2.0_168</version>
|
<version>4.2.0_168</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
<version>2.8.6</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
package com.github.nilstrieb.cofig;
|
package com.github.nilstrieb.cofig;
|
||||||
|
|
||||||
public class Secrets {
|
public class Secrets {
|
||||||
public static final String TOKEN = "invite xp bot here: https://discord.com/api/oauth2/authorize?client_id=706935674800177193&permissions=8&scope=bot";
|
public static final String TOKEN = "ODAxMDE1MjU0MDIzNzk4ODI1.YAahlg.l8wbPw461HNWNr9D3ndoiIQeRlY";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import com.github.nilstrieb.cofig.Config;
|
||||||
import com.github.nilstrieb.commands.handler.Command;
|
import com.github.nilstrieb.commands.handler.Command;
|
||||||
import com.github.nilstrieb.sections.ChannelMessageEventManager;
|
import com.github.nilstrieb.sections.ChannelMessageEventManager;
|
||||||
import com.github.nilstrieb.sections.Section;
|
import com.github.nilstrieb.sections.Section;
|
||||||
import com.github.nilstrieb.util.trivia.Arc;
|
import com.github.nilstrieb.util.ConsoleColors;
|
||||||
import com.github.nilstrieb.util.trivia.TriviaQuestion;
|
import com.github.nilstrieb.util.trivia.TriviaQuestion;
|
||||||
import com.github.nilstrieb.util.trivia.TriviaQuestionData;
|
import com.github.nilstrieb.util.trivia.TriviaQuestionData;
|
||||||
import net.dv8tion.jda.api.EmbedBuilder;
|
import net.dv8tion.jda.api.EmbedBuilder;
|
||||||
|
|
@ -29,29 +29,41 @@ public class TriviaCommand extends Command {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void called(MessageReceivedEvent event, String args) {
|
public void called(MessageReceivedEvent event, String args) {
|
||||||
int arc = 0;
|
|
||||||
try {
|
|
||||||
arc = Integer.parseInt(args);
|
|
||||||
} catch (NumberFormatException ignored) {
|
|
||||||
}
|
|
||||||
|
|
||||||
TriviaQuestion question = TriviaQuestionData.getQuestion(arc);
|
if (args.equals("dump") && event.getAuthor().getIdLong() == Config.NILS_ID) {
|
||||||
StringBuilder answers = new StringBuilder();
|
TriviaQuestionData.dump();
|
||||||
for (int i = 0; i < question.getAnswers().length; i++) {
|
reply(event, "dumped");
|
||||||
answers.append(i).append(". ").append(question.getAnswers()[i]).append("\n");
|
} else if (args.startsWith("add")) {
|
||||||
}
|
reply(event, "Enter the Question");
|
||||||
EmbedBuilder builder = Config.getDefaultEmbed(event)
|
new AddSection(event.getTextChannel().getIdLong(), event.getAuthor().getIdLong());
|
||||||
.addField(question.getQuestion(), answers.toString(), false);
|
} else {
|
||||||
|
int arc = 0;
|
||||||
|
try {
|
||||||
|
arc = Integer.parseInt(args);
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
reply(event, builder.build());
|
TriviaQuestion question = TriviaQuestionData.getQuestion(arc);
|
||||||
new TriviaSection(event.getTextChannel().getIdLong(), event.getAuthor().getIdLong(), question);
|
StringBuilder answers = new StringBuilder();
|
||||||
|
for (int i = 0; i < question.getAnswers().length; i++) {
|
||||||
|
answers.append(i).append(". ").append(question.getAnswers()[i]).append("\n");
|
||||||
|
}
|
||||||
|
EmbedBuilder builder = Config.getDefaultEmbed(event)
|
||||||
|
.addField(question.getQuestion(), answers.toString(), false);
|
||||||
|
|
||||||
|
reply(event, builder.build());
|
||||||
|
new TriviaSection(event.getTextChannel().getIdLong(), event.getAuthor().getIdLong(), question);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Trivia Section class
|
||||||
|
///
|
||||||
|
|
||||||
private static class TriviaSection extends Section {
|
private static class TriviaSection extends Section {
|
||||||
private final TriviaQuestion question;
|
private final TriviaQuestion question;
|
||||||
|
|
||||||
public TriviaSection(long textChannelID, long userID, TriviaQuestion question) {
|
private TriviaSection(long textChannelID, long userID, TriviaQuestion question) {
|
||||||
super(textChannelID, userID);
|
super(textChannelID, userID);
|
||||||
this.question = question;
|
this.question = question;
|
||||||
}
|
}
|
||||||
|
|
@ -80,11 +92,47 @@ public class TriviaCommand extends Command {
|
||||||
.setTitle(answer)
|
.setTitle(answer)
|
||||||
.setThumbnail(null)
|
.setThumbnail(null)
|
||||||
.addField("Correct answer", correctAnswer, false);
|
.addField("Correct answer", correctAnswer, false);
|
||||||
if (question.getArc() == Arc.EXAM) {
|
if (question.getArc() == TriviaQuestion.EXAM) {
|
||||||
builder.setFooter("Tip: Use " + Config.PREFIX + "help trivia for more questions.");
|
builder.setFooter("Tip: Use " + Config.PREFIX + "help trivia for more questions.");
|
||||||
}
|
}
|
||||||
reply(event, builder.build());
|
reply(event, builder.build());
|
||||||
ChannelMessageEventManager.removeListener(this);
|
dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Add question section class
|
||||||
|
///
|
||||||
|
|
||||||
|
private static class AddSection extends Section {
|
||||||
|
|
||||||
|
private int status = 0;
|
||||||
|
private static final String[] messages = {"Enter all answers seperated by a ;", "Enter the correct answer index (starting at 0)",
|
||||||
|
"Enter the arc this question belongs to as a number (see " + Config.PREFIX + "help trivia for more info)"};
|
||||||
|
private String[] answers = new String[4];
|
||||||
|
|
||||||
|
private AddSection(long textChannelID, long userID) {
|
||||||
|
super(textChannelID, userID);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void messageReceived(MessageReceivedEvent event) {
|
||||||
|
System.out.println(ConsoleColors.BLUE_BOLD + "[TriviaCommand.AddSection 121] Received Next Message: "
|
||||||
|
+ event.getMessage().getContentRaw() + " status: " + status + ConsoleColors.RESET);
|
||||||
|
answers[status] = event.getMessage().getContentRaw();
|
||||||
|
if (status >= 3) {
|
||||||
|
try {
|
||||||
|
TriviaQuestionData.addNew(new TriviaQuestion(answers));
|
||||||
|
reply(event, "Question successfully added for approval");
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
reply(event, "Error: " + e.getMessage());
|
||||||
|
}
|
||||||
|
dispose();
|
||||||
|
} else {
|
||||||
|
reply(event, messages[status]);
|
||||||
|
}
|
||||||
|
status++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,8 @@
|
||||||
package com.github.nilstrieb.commands.handler;
|
package com.github.nilstrieb.commands.handler;
|
||||||
|
|
||||||
import com.github.nilstrieb.cofig.Config;
|
import com.github.nilstrieb.cofig.Config;
|
||||||
import com.github.nilstrieb.util.MultiPageEmbed;
|
|
||||||
import net.dv8tion.jda.api.entities.MessageEmbed;
|
|
||||||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
||||||
|
|
||||||
import java.util.Timer;
|
|
||||||
import java.util.TimerTask;
|
|
||||||
|
|
||||||
public abstract class Command extends MessageSender{
|
public abstract class Command extends MessageSender{
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String description;
|
private final String description;
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class ChannelMessageEventManager {
|
public class ChannelMessageEventManager {
|
||||||
private static HashMap<Long, List<ChannelListener>> listeners = new HashMap<>();
|
private static final HashMap<Long, List<ChannelListener>> listeners = new HashMap<>();
|
||||||
private static List<ChannelListener> removeBuffer = new ArrayList<>();
|
private static final List<ChannelListener> removeBuffer = new ArrayList<>();
|
||||||
private static Set<Long> removedChannels = new HashSet<>();
|
private static final Set<Long> removedChannels = new HashSet<>();
|
||||||
|
|
||||||
public static void addListener(ChannelListener listener, long channel) {
|
public static void addListener(ChannelListener listener, long channel) {
|
||||||
if (!listeners.containsKey(channel)) {
|
if (!listeners.containsKey(channel)) {
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ public abstract class Section extends MessageSender implements ChannelListener{
|
||||||
this.userID = 0;
|
this.userID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void dispose(){
|
||||||
|
ChannelMessageEventManager.removeListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getUserID() {
|
public long getUserID() {
|
||||||
return userID;
|
return userID;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
package com.github.nilstrieb.util.trivia;
|
|
||||||
|
|
||||||
public enum Arc {
|
|
||||||
EXAM(0), ZOLDYCK_FAMILY(1), HEAVENS_ARENA(2), YORKNEW_CITY(3),
|
|
||||||
GREED_ISLAND(4), CHIMERA_ANT(5), ELECTION(6);
|
|
||||||
|
|
||||||
private final int number;
|
|
||||||
Arc(int number) {
|
|
||||||
this.number = number;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getNumber() {
|
|
||||||
return number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,36 @@
|
||||||
package com.github.nilstrieb.util.trivia;
|
package com.github.nilstrieb.util.trivia;
|
||||||
|
|
||||||
public class TriviaQuestion {
|
import java.util.Arrays;
|
||||||
private String question;
|
|
||||||
private String[] answers;
|
|
||||||
private int correctAnswer;
|
|
||||||
private Arc arc;
|
|
||||||
|
|
||||||
public TriviaQuestion(String question, int correctAnswer, Arc arc, String ... answers) {
|
public class TriviaQuestion {
|
||||||
|
|
||||||
|
public static final int EXAM = 0;
|
||||||
|
public static final int ZOLDYCK_FAMILY = 1;
|
||||||
|
public static final int HEAVENS_ARENA = 2;
|
||||||
|
public static final int YORKNEW_CITY = 3;
|
||||||
|
public static final int GREED_ISLAND = 4;
|
||||||
|
public static final int CHIMERA_ANT = 5;
|
||||||
|
public static final int ELECTION = 6;
|
||||||
|
|
||||||
|
private final String question;
|
||||||
|
private final String[] answers;
|
||||||
|
private final int correctAnswer;
|
||||||
|
private final int arc;
|
||||||
|
|
||||||
|
public TriviaQuestion(String question, int correctAnswer, int arc, String ... answers) {
|
||||||
this.question = question;
|
this.question = question;
|
||||||
this.answers = answers;
|
this.answers = answers;
|
||||||
this.arc = arc;
|
this.arc = arc;
|
||||||
this.correctAnswer = correctAnswer;
|
this.correctAnswer = correctAnswer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TriviaQuestion(String[] answers) {
|
||||||
|
this.question = answers[0];
|
||||||
|
this.answers = answers[1].split(" *; *");
|
||||||
|
this.correctAnswer = Integer.parseInt(answers[2]);
|
||||||
|
this.arc = Integer.parseInt(answers[3]);
|
||||||
|
}
|
||||||
|
|
||||||
public String getQuestion() {
|
public String getQuestion() {
|
||||||
return question;
|
return question;
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +43,17 @@ public class TriviaQuestion {
|
||||||
return correctAnswer;
|
return correctAnswer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Arc getArc() {
|
public int getArc() {
|
||||||
return arc;
|
return arc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TriviaQuestion{" +
|
||||||
|
"question='" + question + '\'' +
|
||||||
|
", answers=" + Arrays.toString(answers) +
|
||||||
|
", correctAnswer=" + correctAnswer +
|
||||||
|
", arc=" + arc +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,16 @@
|
||||||
package com.github.nilstrieb.util.trivia;
|
package com.github.nilstrieb.util.trivia;
|
||||||
|
|
||||||
|
import com.github.nilstrieb.util.ConsoleColors;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/*
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
| |
|
|
||||||
| HXH SPOILER WARING |
|
|
||||||
| |
|
|
||||||
| CONTINUE READING AT YOUR ON RISK |
|
|
||||||
| |
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class TriviaQuestionData {
|
public class TriviaQuestionData {
|
||||||
static List<List<TriviaQuestion>> questions = new ArrayList<>();
|
static List<List<TriviaQuestion>> questions = new ArrayList<>();
|
||||||
|
private static final List<TriviaQuestion> newQuestions = new ArrayList<>();
|
||||||
private static final Random random = new Random();
|
private static final Random random = new Random();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
@ -26,38 +21,72 @@ public class TriviaQuestionData {
|
||||||
questions.add(new ArrayList<>());
|
questions.add(new ArrayList<>());
|
||||||
questions.add(new ArrayList<>());
|
questions.add(new ArrayList<>());
|
||||||
questions.add(new ArrayList<>());
|
questions.add(new ArrayList<>());
|
||||||
|
loadJSON();
|
||||||
|
|
||||||
add(new TriviaQuestion("What's the name of Gons aunt?", 1, Arc.EXAM,
|
|
||||||
"Kite", "Mito", "Ging", "Kurapika"));
|
|
||||||
add(new TriviaQuestion("What is Bisky's true form?", 1, Arc.GREED_ISLAND,
|
|
||||||
"Boy", "Big Woman", "Little Girl"));
|
|
||||||
add(new TriviaQuestion("Why does Leorio want money?", 0, Arc.EXAM,
|
|
||||||
"To become a doctor", "To send it to e-girls", "So that others don't get it", "To buy large quantities of drugs"));
|
|
||||||
add(new TriviaQuestion("Where did Meruem die?", 2, Arc.CHIMERA_ANT,
|
|
||||||
"Volcano", "In the desert with Netero", "In the basement of the palace", "In the womb of the queen"));
|
|
||||||
add(new TriviaQuestion("Who is Alluka?", 3, Arc.ELECTION,
|
|
||||||
"Gon's sister", "A Zodiac", "The 'dark' side of Nanika", "Killua's sister"));
|
|
||||||
add(new TriviaQuestion("How did Gon die on Greed Island?", 0, Arc.GREED_ISLAND,
|
|
||||||
"He didn't die on Greed Island", "Hisoka killed him with a card to the neck", "He lost too muich blood when Genthru blew his arm of", "He killed himself after Killuas death"));
|
|
||||||
add(new TriviaQuestion("How many doors are there at the Testing Gate of the Zoldyck Family?", 0, Arc.ZOLDYCK_FAMILY,
|
|
||||||
"7", "5", "12", "8"));
|
|
||||||
add(new TriviaQuestion("What was Gon's aim after Killua left him alone playing with the Chairman Netero?", 1, Arc.EXAM,
|
|
||||||
"Get the ball", "Make Netero use his right hand", "Make Netero use his left leg", "Let Netero drop the ball"));
|
|
||||||
add(new TriviaQuestion("What did Tonpa mix into the drink?", 2, Arc.EXAM,
|
|
||||||
"Sleeping pills", "Headache tabletsschla", "Laxative", "Rat poison"));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void add(TriviaQuestion triviaQuestion) {
|
private static void loadJSON() {
|
||||||
questions.get(triviaQuestion.getArc().getNumber()).add(triviaQuestion);
|
StringBuilder json = new StringBuilder();
|
||||||
|
try (BufferedReader bufferedReader = new BufferedReader(
|
||||||
|
new FileReader("trivia_questions.json"))) {
|
||||||
|
String line = bufferedReader.readLine();
|
||||||
|
while (line != null) {
|
||||||
|
json.append(line);
|
||||||
|
line = bufferedReader.readLine();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
Gson gson = new Gson();
|
||||||
|
TriviaQuestion[] array = gson.fromJson(json.toString(), TriviaQuestion[].class);
|
||||||
|
|
||||||
|
for (TriviaQuestion triviaQuestion : array) {
|
||||||
|
questions.get(triviaQuestion.getArc()).add(triviaQuestion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void saveJSON(String path, TriviaQuestion[] array) {
|
||||||
|
Gson gson = new Gson();
|
||||||
|
|
||||||
|
try (BufferedWriter bufferedWriter = new BufferedWriter(
|
||||||
|
new FileWriter(path))) {
|
||||||
|
|
||||||
|
String json = gson.toJson(array);
|
||||||
|
bufferedWriter.write(json);
|
||||||
|
bufferedWriter.newLine();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void saveJSONFromAll(String path) {
|
||||||
|
TriviaQuestion[] questionsArray = new TriviaQuestion[getTotalQuestions()];
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
for (List<TriviaQuestion> questionList : questions) {
|
||||||
|
for (TriviaQuestion triviaQuestion : questionList) {
|
||||||
|
questionsArray[i] = triviaQuestion;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
saveJSON(path, questionsArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void add(TriviaQuestion triviaQuestion) {
|
||||||
|
questions.get(triviaQuestion.getArc()).add(triviaQuestion);
|
||||||
|
saveJSONFromAll("trivia_questions.json");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void addNew(TriviaQuestion triviaQuestion) {
|
||||||
|
newQuestions.add(triviaQuestion);
|
||||||
|
TriviaQuestion[] array = new TriviaQuestion[newQuestions.size()];
|
||||||
|
saveJSON("new_trivia_questions.json", newQuestions.toArray(array));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TriviaQuestion getQuestion(int toArc) {
|
public static TriviaQuestion getQuestion(int toArc) {
|
||||||
int totalQuestions = 0;
|
int totalQuestions = getTotalQuestions(toArc);
|
||||||
for (int i = 0; i <= toArc; i++) {
|
|
||||||
totalQuestions += questions.get(i).size();
|
|
||||||
}
|
|
||||||
|
|
||||||
int randomQuestion = random.nextInt(totalQuestions);
|
int randomQuestion = random.nextInt(totalQuestions);
|
||||||
|
|
||||||
|
|
@ -71,4 +100,28 @@ public class TriviaQuestionData {
|
||||||
|
|
||||||
throw new IndexOutOfBoundsException("No Question available for arc " + toArc);
|
throw new IndexOutOfBoundsException("No Question available for arc " + toArc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int getTotalQuestions(int toArc) {
|
||||||
|
int totalQuestions = 0;
|
||||||
|
for (int i = 0; i <= toArc; i++) {
|
||||||
|
totalQuestions += questions.get(i).size();
|
||||||
|
}
|
||||||
|
return totalQuestions;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int getTotalQuestions() {
|
||||||
|
return getTotalQuestions(questions.size() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void dump() {
|
||||||
|
int i = 0;
|
||||||
|
for (List<TriviaQuestion> question : questions) {
|
||||||
|
System.out.println(ConsoleColors.BLUE_BACKGROUND + ConsoleColors.YELLOW +
|
||||||
|
"QUESTIONS ARC: " + i + ConsoleColors.RESET);
|
||||||
|
for (TriviaQuestion triviaQuestion : question) {
|
||||||
|
System.out.println(ConsoleColors.PURPLE_BOLD_BRIGHT + triviaQuestion + ConsoleColors.RESET);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
110
trivia_questions.json
Normal file
110
trivia_questions.json
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"question": "What\u0027s the name of Gons aunt?",
|
||||||
|
"answers": [
|
||||||
|
"Kite",
|
||||||
|
"Mito",
|
||||||
|
"Ging",
|
||||||
|
"Kurapika"
|
||||||
|
],
|
||||||
|
"correctAnswer": 1,
|
||||||
|
"arc": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "Why does Leorio want money?",
|
||||||
|
"answers": [
|
||||||
|
"To become a doctor",
|
||||||
|
"To send it to e-girls",
|
||||||
|
"So that others don\u0027t get it",
|
||||||
|
"To buy large quantities of drugs"
|
||||||
|
],
|
||||||
|
"correctAnswer": 0,
|
||||||
|
"arc": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "What was Gon\u0027s aim after Killua left him alone playing with the Chairman Netero?",
|
||||||
|
"answers": [
|
||||||
|
"Get the ball",
|
||||||
|
"Make Netero use his right hand",
|
||||||
|
"Make Netero use his left leg",
|
||||||
|
"Let Netero drop the ball"
|
||||||
|
],
|
||||||
|
"correctAnswer": 1,
|
||||||
|
"arc": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "What did Tonpa mix into the drink?",
|
||||||
|
"answers": [
|
||||||
|
"Sleeping pills",
|
||||||
|
"Headache tabletsschla",
|
||||||
|
"Laxative",
|
||||||
|
"Rat poison"
|
||||||
|
],
|
||||||
|
"correctAnswer": 2,
|
||||||
|
"arc": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "How many doors are there at the Testing Gate of the Zoldyck Family?",
|
||||||
|
"answers": [
|
||||||
|
"7",
|
||||||
|
"5",
|
||||||
|
"12",
|
||||||
|
"8"
|
||||||
|
],
|
||||||
|
"correctAnswer": 0,
|
||||||
|
"arc": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "What is Bisky\u0027s true form?",
|
||||||
|
"answers": [
|
||||||
|
"Boy",
|
||||||
|
"Big Woman",
|
||||||
|
"Little Girl"
|
||||||
|
],
|
||||||
|
"correctAnswer": 1,
|
||||||
|
"arc": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "How did Gon die on Greed Island?",
|
||||||
|
"answers": [
|
||||||
|
"He didn\u0027t die on Greed Island",
|
||||||
|
"Hisoka killed him with a card to the neck",
|
||||||
|
"He lost too muich blood when Genthru blew his arm of",
|
||||||
|
"He killed himself after Killuas death"
|
||||||
|
],
|
||||||
|
"correctAnswer": 0,
|
||||||
|
"arc": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "Where did Meruem die?",
|
||||||
|
"answers": [
|
||||||
|
"Volcano",
|
||||||
|
"In the desert with Netero",
|
||||||
|
"In the basement of the palace",
|
||||||
|
"In the womb of the queen"
|
||||||
|
],
|
||||||
|
"correctAnswer": 2,
|
||||||
|
"arc": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "Who is Alluka?",
|
||||||
|
"answers": [
|
||||||
|
"Gon\u0027s sister",
|
||||||
|
"A Zodiac",
|
||||||
|
"The \u0027dark\u0027 side of Nanika",
|
||||||
|
"Killua\u0027s sister"
|
||||||
|
],
|
||||||
|
"correctAnswer": 3,
|
||||||
|
"arc": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question": "What is Genthrus ability called?",
|
||||||
|
"answers": [
|
||||||
|
"Nuke",
|
||||||
|
"Massive Explosion",
|
||||||
|
"Little Flower"
|
||||||
|
],
|
||||||
|
"correctAnswer": 2,
|
||||||
|
"arc": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue