diff --git a/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java b/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java index 15ecda3..45a0f44 100644 --- a/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java +++ b/src/test/java/ch/zhaw/pm2/racetrack/GameTest.java @@ -255,7 +255,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; @@ -264,6 +269,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 options) { pointerInstruction++; @@ -271,12 +282,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) {