Merge remote-tracking branch 'origin/main'

This commit is contained in:
romanschenk37 2022-03-25 10:52:43 +01:00
commit 09ab684fdd
1 changed files with 23 additions and 12 deletions

View File

@ -62,14 +62,25 @@ public class Car implements CarSpecification {
return id;
}
/**
* Increases the winpoints by one
*/
public void increaseWinPoints() {
winPoints++;
}
/**
* Decreases the winpoints by one
*/
public void deductWinPoints() {
winPoints--;
}
/**
* Returns the current value of winpoints.
*
* @return winpoints of the car
*/
public int getWinPoints() {
return winPoints;
}
@ -140,7 +151,7 @@ public class Car implements CarSpecification {
}
/**
* Mark this Car as being crashed.
* Marks the car as crashed
*/
@Override
public void crash() {
@ -148,7 +159,7 @@ public class Car implements CarSpecification {
}
/**
* Returns whether this Car has been marked as crashed.
* Returns whether this Car has been marked as crashed or not
*
* @return Returns true if crash() has been called on this Car, false otherwise.
*/
@ -158,20 +169,20 @@ public class Car implements CarSpecification {
}
/**
* Set move strategy
* Returns the current move Strategy
*
* @return the current move Strategy
*/
public MoveStrategy getMoveStrategy() {
return this.moveStrategy;
}
/**
* Set the move Strategy of the car.
*
* @param moveStrategy Strategy to be implemented
*/
public void setMoveStrategy(MoveStrategy moveStrategy) {
this.moveStrategy = moveStrategy;
}
/**
* Get current move strategy
*
* @return MoveStrategy
*/
public MoveStrategy getMoveStrategy() {
return this.moveStrategy;
}
}