use of ultima.Constants.ClassType in project ultimate-java by pantinor.
the class TestJaxb method testStartQuestions.
// @Test
public void testStartQuestions() throws Exception {
Map<ClassType, Integer> dist = new HashMap<>();
for (ClassType ct : ClassType.values()) {
dist.put(ct, 0);
}
for (int z = 0; z < 100; z++) {
StartScreen.questionRound = 0;
StartScreen.initQuestionTree();
System.out.println("INIT\n");
for (int i = 0; i < 15; i++) {
System.out.println(i + ") " + Virtue.get(StartScreen.questionTree[i]));
}
while (!StartScreen.doQuestion(new Random().nextInt(2))) {
printQuestionDesc(StartScreen.questionRound);
}
// System.out.println("\nANSWERS\n");
// for (int i = 0; i < 15; i++) {
// System.out.println(i + ") " +Virtue.get(StartScreen.questionTree[i]));
// }
SaveGame sg = new SaveGame();
SaveGame.SaveGamePlayerRecord avatar = sg.new SaveGamePlayerRecord();
avatar.adjuestAttribsPerKarma(StartScreen.questionTree);
avatar.klass = ClassType.get(StartScreen.questionTree[14]);
int[] questionTree = StartScreen.questionTree;
// System.out.println(avatar.klass);
dist.put(avatar.klass, dist.get(avatar.klass) + 1);
}
for (ClassType ct : ClassType.values()) {
System.out.println(ct + " " + dist.get(ct));
}
}
Aggregations