@@ -7,8 +7,6 @@ import io.kotest.matchers.collections.shouldBeOneOf
77import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
88import io.kotest.matchers.maps.shouldBeEmpty
99import io.kotest.matchers.maps.shouldHaveSize
10- import io.kotest.matchers.maps.shouldNotBeEmpty
11- import io.kotest.matchers.nulls.shouldBeNull
1210import io.kotest.matchers.shouldBe
1311import io.kotest.matchers.string.shouldHaveLineCount
1412import io.kotest.matchers.string.shouldNotContain
@@ -67,20 +65,20 @@ class BoardTest: FunSpec({
6765 test("not for other team") {
6866 val moewe = Piece (Moewe , Team .TWO )
6967 val board = Board (mutableMapOf(coords to moewe))
70- board.movePiece(Move (coords, coords.copy(y = 7))) shouldBe moewe
71- board.shouldNotBeEmpty()
68+ board.movePiece(Move (0 y 6, 0 y 7)) shouldBe 0
69+ board shouldHaveSize 1
7270 }
7371 test("from position") {
7472 val moewe = Piece (Moewe , Team .ONE )
7573 val board = Board (mutableMapOf(coords to moewe))
76- board.movePiece(Move (coords, coords.copy(y = 7))).shouldBeNull()
74+ board.movePiece(Move (0 y 6, 0 y 7)) shouldBe 1
7775 board.shouldBeEmpty()
7876 }
7977 test("not from Robbe in position") {
8078 val robbe = Piece (Robbe , Team .ONE )
8179 val board = Board (mutableMapOf(coords to robbe))
82- board.movePiece(Move (coords, Coordinates (2, 7))) shouldBe robbe
83- board.shouldNotBeEmpty()
80+ board.movePiece(Move (0 y 6, 2 y 7)) shouldBe 0
81+ board shouldHaveSize 1
8482 }
8583 context("from tower") {
8684 val board = makeBoard(0 y 1 to "M ", 0 y 0 to "S2 ", 1 y 0 to "m", 1 y 1 to "r")
@@ -90,11 +88,10 @@ class BoardTest: FunSpec({
9088 }.mistake shouldBe MoveMistake .DESTINATION_BLOCKED
9189 }
9290 test("move tower") {
93- board.movePiece(Move (0 y 0, 1 y 1)).shouldBeNull()
91+ board.movePiece(Move (0 y 0, 1 y 1)) shouldBe 1
9492 }
9593 test("move onto tower") {
96- // TODO that should be a double amber
97- board.movePiece(Move (1 y 0, 0 y 0)).shouldBeNull()
94+ board.movePiece(Move (1 y 0, 0 y 0)) shouldBe 2
9895 }
9996 }
10097 }
0 commit comments