changes in Methods in Game.java
created MainClass.java
This commit is contained in:
@@ -122,7 +122,7 @@ public class Game implements GameSpecification {
|
||||
@Override
|
||||
public int getWinner() {
|
||||
// TODO: implementation
|
||||
throw new UnsupportedOperationException();
|
||||
return NO_WINNER;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,14 +168,16 @@ public class Game implements GameSpecification {
|
||||
track.carDoesCrash(currentCarIndex, crashPosition);
|
||||
}
|
||||
else {
|
||||
track.getCar(currentCarIndex).move();
|
||||
track.moveCar(currentCarIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public void gamePhase() {
|
||||
do{
|
||||
userInterface.printTrack(track);
|
||||
doCarTurn(userInterface.selectDirection(currentCarIndex, track.getCarId(currentCarIndex)));
|
||||
track.getCar(currentCarIndex).getMoveStrategy(); //TODO Movestrategy berücksichtigen ??
|
||||
Direction direction = userInterface.selectDirection(currentCarIndex, track.getCarId(currentCarIndex));
|
||||
doCarTurn(direction);
|
||||
if(getWinner() != NO_WINNER) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user