code cleanup

This commit is contained in:
romanschenk37 2022-03-25 23:38:26 +01:00
parent ee6b348611
commit 52d0ace051
1 changed files with 6 additions and 6 deletions

View File

@ -160,7 +160,7 @@ class GameTest {
*/
@Test
void winner() {
game = new Game(new interFace("Test",new Integer[]{0,2,0},new PositionVector.Direction[]{RIGHT,
game = new Game(new Interface("Test",new Integer[]{0,2,0},new PositionVector.Direction[]{RIGHT,
RIGHT,
RIGHT,
NONE,
@ -208,7 +208,7 @@ class GameTest {
*/
@Test
void crashA() {
game = new Game(new interFace("Test",new Integer[]{0,1,0},new PositionVector.Direction[]{UP}), new Config());
game = new Game(new Interface("Test",new Integer[]{0,1,0},new PositionVector.Direction[]{UP}), new Config());
game.initPhase();
Assertions.assertEquals("b",game.gamePhase());
}
@ -218,7 +218,7 @@ class GameTest {
*/
@Test
void passFinishLineInWrongDirection() {
game = new Game(new interFace("Test",new Integer[]{1,0,1},new PositionVector.Direction[]{LEFT,NONE,NONE,RIGHT,RIGHT}), new Config());
game = new Game(new Interface("Test",new Integer[]{1,0,1},new PositionVector.Direction[]{LEFT,NONE,NONE,RIGHT,RIGHT}), new Config());
game.initPhase();
Assertions.assertEquals("a",game.gamePhase());
}
@ -241,15 +241,15 @@ class GameTest {
* This Class is used to communicate with the UserInterface. It overrides crucial methods and returns an instruction based on the instructions' data field.
* To implement the right instructions the user has to be aware of the game sequence.
*/
private class interFace extends UserInterface {
private class Interface extends UserInterface {
private final PositionVector.Direction[] directions;
private final Integer[] instructions;
private int pointerDir,pointerInstruction;
public interFace(String welcometxt, Integer[] instructions, PositionVector.Direction[] directions) {
super(welcometxt);
public Interface(String welcometext, Integer[] instructions, PositionVector.Direction[] directions) {
super(welcometext);
pointerDir = -1;
pointerInstruction = -1;
this.instructions = instructions;