some cleaning
This commit is contained in:
parent
6e966919d3
commit
2be1478744
|
@ -17,18 +17,13 @@ public class MarsMap {
|
|||
private static final int FIRST_POSITION_IN_MAP = 1;
|
||||
private static final int INCREMENT_UNIT = 1;
|
||||
|
||||
private final int height;
|
||||
private final int width;
|
||||
private Coordinates currentPosition;
|
||||
private Direction currentMovementDirection;
|
||||
private final List<Coordinates> obstaclesLocalizations;
|
||||
|
||||
private final MapIncrementalPositionResolver positionResolver;
|
||||
|
||||
@SafeVarargs
|
||||
public MarsMap(int height, int width, Coordinates startingCoordinates, List<Coordinates>... obstaclesLocalizations) {
|
||||
this.height = height;
|
||||
this.width = width;
|
||||
currentPosition = startingCoordinates;
|
||||
this.obstaclesLocalizations = obstaclesLocalizations.length > 0 ? obstaclesLocalizations[0] : List.of();
|
||||
positionResolver = new MapIncrementalPositionResolver(FIRST_POSITION_IN_MAP, INCREMENT_UNIT, height, width);
|
||||
|
|
Loading…
Reference in New Issue