Skip to content

Commit

Permalink
Umbenennung Deutsch --> Englisch
Browse files Browse the repository at this point in the history
  • Loading branch information
mipet23 committed Dec 12, 2021
1 parent 043f023 commit bc5d20e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 93 deletions.
4 changes: 0 additions & 4 deletions src/main/java/org/kryptojagd/fileprocessing/ReadJSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@

import com.google.gson.Gson;

<<<<<<< HEAD:src/main/java/org/kryptojagd/fileprocessing/ReadJSON.java
import org.kryptojagd.level.DecryptionTask;
import org.kryptojagd.level.MultipleChoiceQuestion;

public class ReadJSON {
=======
public class AufgabenEinlesen {
>>>>>>> 720278078edb37aa760bdf7d21f5ca5bec41b96c:src/main/java/org/kryptojagd/dateiverarbeitung/AufgabenEinlesen.java

// gibt Mul
public static MultipleChoiceQuestion createMultiChoiceQuestion() {
Expand Down
38 changes: 2 additions & 36 deletions src/main/java/org/kryptojagd/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,14 @@

import java.util.LinkedList;

/**
* The class describes a level in the game
*
* @author Sonja
*/
public class Level {

private final LinkedList<Task> level = new LinkedList<>();
private Task currentTask;

/**
* Creates a {@link Level}
*
* @param decryptionTask first task in level is a decryptionTask
* @param encryptionTask second task in level is a encryptionTask
* @param multipleChoiceTask third and last task is a Collection of multiple choice questions
*/
private LinkedList<Task> level = new LinkedList<>();

public Level(DecryptionTask decryptionTask, EncryptionTask encryptionTask, MultipleChoiceTask multipleChoiceTask) {
level.add(decryptionTask);
level.add(encryptionTask);
level.add(multipleChoiceTask);
this.currentTask = level.getFirst();
}

/**
* Gives the next Task in the chronology of the level
*
* @return the current task in level
*/
public Task giveNextTask() {
currentTask = level.iterator().next();
return currentTask;
}

/**
* Checks the answer to the current task
*
* @param answer the answer which is given
* @return trur, if the answer is correct
*/
public boolean proofCurrentTask(String answer) {
return currentTask.proofAnswer(answer);
}

}
11 changes: 1 addition & 10 deletions src/main/java/org/kryptojagd/level/tasks/DecryptionTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@

import org.kryptojagd.encryptionmethods.Encryption;

/**
* The class describes a task, where you have to decrypt text
*
* @author Sonja
*/

public class DecryptionTask implements Task {

private Encryption encryption;

/**
* Creates a {@link DecryptionTask}
*
* @param encryption the encryption, in which you have to decrypt the text
*/
public DecryptionTask(Encryption encryption) {
this.encryption = encryption;
}
Expand Down
11 changes: 1 addition & 10 deletions src/main/java/org/kryptojagd/level/tasks/EncryptionTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@

import org.kryptojagd.encryptionmethods.Encryption;

/**
* The class describes a task, where you have to encrypt text
*
* @author Sonja
*/

public class EncryptionTask implements Task {

private Encryption encryption;

/**
* Creates a {@link EncryptionTask}
*
* @param encryption the encryption, in which you have to encrypt the text
*/
public EncryptionTask(Encryption encryption) {
this.encryption = encryption;
}
Expand Down
32 changes: 3 additions & 29 deletions src/main/java/org/kryptojagd/level/tasks/MultipleChoiceTask.java
Original file line number Diff line number Diff line change
@@ -1,40 +1,14 @@
package org.kryptojagd.level.tasks;

import org.kryptojagd.level.Level;
import java.util.HashMap;

/**
* The class describes a task, where you have to answer multiple choice questions
*
* @author Sonja
*/
public class MultipleChoiceTask implements Task {

private String question;
private String answer;
private String[] possibilities;

/**
* Creates a {@link MultipleChoiceTask}
*
* @param question the question, which you have to answer
* @param answer the right answer of the question
* @param possibilities the possibilities to answer
*/
public MultipleChoiceTask(String question, String answer, String[] possibilities) {
this.question = question;
this.answer = answer;
this.possibilities = possibilities;
public MultipleChoiceTask(HashMap<String,Object> input) {
}

@Override
public boolean proofAnswer(String answer) {
return this.answer.equals(answer);
return false;
}

@Override
public String toString() {
String multipleChoice = "";
return multipleChoice;
}

}
3 changes: 0 additions & 3 deletions src/main/java/org/kryptojagd/level/tasks/Task.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.kryptojagd.level.tasks;

<<<<<<< HEAD
import org.kryptojagd.encryptionmethods.Encryption;

=======
>>>>>>> 720278078edb37aa760bdf7d21f5ca5bec41b96c
/**
* The interface describes the form of a task in the game
*
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/kryptojagd/level/LevelTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.kryptojagd.level.tasks.DecryptionTask;
import org.kryptojagd.level.tasks.EncryptionTask;
import org.kryptojagd.level.tasks.MultipleChoiceTask;
import org.kryptojagd.verschluesselungsverfahren.Caesar;
import org.kryptojagd.encryptionmethods.Caesar;

import static org.junit.jupiter.api.Assertions.*;

Expand Down

0 comments on commit bc5d20e

Please sign in to comment.