|
@ -31,8 +31,13 @@ class MatchfieldPositioningTest { |
|
|
|
|
|
|
|
|
static Stream<Arguments> testShipPositioning() { |
|
|
static Stream<Arguments> testShipPositioning() { |
|
|
Coordinate[] coordinatesWithShip00_2_0 = new Coordinate[] { new Coordinate(0, 0), new Coordinate(1, 0) }; |
|
|
Coordinate[] coordinatesWithShip00_2_0 = new Coordinate[] { new Coordinate(0, 0), new Coordinate(1, 0) }; |
|
|
|
|
|
|
|
|
return Stream.of(Arguments.of("set ship from 0:0, length 2, direction 0", 10, new Coordinate(0, 0), 0, 2, |
|
|
|
|
|
coordinatesWithShip00_2_0)); |
|
|
|
|
|
|
|
|
Coordinate[] coordinatesWithShip01_3_0 = new Coordinate[] { new Coordinate(0, 1), new Coordinate(1, 1), |
|
|
|
|
|
new Coordinate(2, 1) }; |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("set ship from 0:0, length 2, direction 0", 10, new Coordinate(0, 0), 0, 2, |
|
|
|
|
|
coordinatesWithShip00_2_0), |
|
|
|
|
|
Arguments.of("set ship from 0:1, length 3, direction 0", 10, new Coordinate(0, 1), 0, 3, |
|
|
|
|
|
coordinatesWithShip01_3_0)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |