Javadoc in GameTest.java
This commit is contained in:
parent
31c76273c9
commit
9a278eb2db
|
@ -253,7 +253,12 @@ class GameTest {
|
|||
private final Integer[] instructions;
|
||||
private int pointerDir,pointerInstruction;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor to create a new Interface Object
|
||||
* @param welcometext The first Text which will be printed in the UserInterface Window
|
||||
* @param instructions list of instructions to simulate userinput
|
||||
* @param directions list of Directions to simulate userinput
|
||||
*/
|
||||
public Interface(String welcometext, Integer[] instructions, PositionVector.Direction[] directions) {
|
||||
super(welcometext);
|
||||
pointerDir = -1;
|
||||
|
@ -262,6 +267,12 @@ class GameTest {
|
|||
this.directions = directions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwriting Method for testing without userinteraction
|
||||
* @param text Text which is printed before the options are printed. Example: "Select Track file:"
|
||||
* @param options List with the options which can be selected.
|
||||
* @return the selected Option
|
||||
*/
|
||||
@Override
|
||||
public int selectOption(String text, List<String> options) {
|
||||
pointerInstruction++;
|
||||
|
@ -269,12 +280,29 @@ class GameTest {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwriting Method for testing without userinteraction
|
||||
* @param text The Text which should be printed.
|
||||
*/
|
||||
@Override
|
||||
public void printInformation(String text) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwriting Method for testing without userinteraction
|
||||
* @param text Output Text
|
||||
*/
|
||||
@Override
|
||||
public void quit(String text) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwriting Method for testing without userinteraction
|
||||
* @param playingCarIndex the index of the player
|
||||
* @param playingCarID the ID of the player
|
||||
* @return the direction to accelerate
|
||||
*/
|
||||
@Override
|
||||
public PositionVector.Direction selectDirection(int playingCarIndex, char playingCarID) {
|
||||
pointerDir += 1;
|
||||
if(pointerDir < directions.length) {
|
||||
|
|
Loading…
Reference in New Issue