@@ -37,7 +37,7 @@ class AdvanceTest: FunSpec({
3737 test("across current") {
3838 shouldThrow<InvalidMoveException > {
3939 gameState.performMoveDirectly(Move (Turn (CubeDirection .DOWN_RIGHT ), Advance (1)))
40- }.mistake shouldBe AdvanceProblem .NO_MOVEMENT_POINTS
40+ }.mistake shouldBe AdvanceProblem .MOVEMENT_POINTS_MISSING
4141 listOf(1, 2, 3).forAll {
4242 val state = gameState.performMove(Move (Accelerate (it), Advance (it)))
4343 (state as GameState ).otherShip.position shouldBe CubeCoordinates (-1, it - 1)
@@ -50,7 +50,7 @@ class AdvanceTest: FunSpec({
5050 shipONE.position = CubeCoordinates .ORIGIN
5151 shouldThrow<InvalidMoveException > {
5252 gameState.performMoveDirectly(Move (Advance (1)))
53- }.mistake shouldBe AdvanceProblem .NO_MOVEMENT_POINTS
53+ }.mistake shouldBe AdvanceProblem .MOVEMENT_POINTS_MISSING
5454 listOf(1, 2).forAll {
5555 val state = gameState.performMove(Move (Accelerate (it), Advance (it)))
5656 (state as GameState ).otherShip.position shouldBe CubeCoordinates (it, 0)
@@ -59,14 +59,14 @@ class AdvanceTest: FunSpec({
5959 test("double crossing") {
6060 shouldThrow<InvalidMoveException > {
6161 gameState.performMove(Move (Accelerate (4), Turn (CubeDirection .DOWN_RIGHT ), Advance (2), Turn (CubeDirection .UP_RIGHT ), Advance (2)))
62- }.mistake shouldBe AdvanceProblem .NO_MOVEMENT_POINTS
62+ }.mistake shouldBe AdvanceProblem .MOVEMENT_POINTS_MISSING
6363 gameState.performMoveDirectly(Move (Accelerate (5), Turn (CubeDirection .DOWN_RIGHT ), Advance (2), Turn (CubeDirection .UP_RIGHT ), Advance (2)))
6464 shipONE.position shouldBe CubeCoordinates (1, -1)
6565 }
6666 }
6767
6868 test("no movement points") {
69- Advance (3).perform(gameState) shouldBe AdvanceProblem .NO_MOVEMENT_POINTS
69+ Advance (3).perform(gameState) shouldBe AdvanceProblem .MOVEMENT_POINTS_MISSING
7070 }
7171
7272 context("invalid distance") {
@@ -118,7 +118,7 @@ class AdvanceTest: FunSpec({
118118 dest != null && dest.isEmpty
119119 } ? : throw IllegalStateException ("No valid direction found.")
120120
121- Advance (2).perform(gameState) shouldBe AdvanceProblem .NO_MOVEMENT_POINTS
121+ Advance (2).perform(gameState) shouldBe AdvanceProblem .MOVEMENT_POINTS_MISSING
122122 }
123123
124124 context("on opponent") {
0 commit comments