Skip to content

Commit 6bd073c

Browse files
committedMar 25, 2024·
add more tests
1 parent 87dd989 commit 6bd073c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎test/ch/epfl/chacun/InitialGameStateTest.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,16 @@ void testGame() {
348348

349349
branch2 = branch2.withOccupantRemoved(occupant1T);
350350
assertEquals(0, branch2.board().occupantCount(PlayerColor.YELLOW, Occupant.Kind.PAWN));
351+
branch2 = branch2.withNewOccupant(occupant1T);
352+
353+
assertEquals(GameState.Action.END_GAME, branch2.nextAction());
354+
assertEquals("The winners are [RED] with 8 points.", branch2.messageBoard().messages().getLast().text());
351355

352-
356+
assertNull(branch2.currentPlayer());
353357

354358
// at the end of the game
355-
// assert currentPlayer is null
356359
// assert free occupants count (standard situation + after closing a forest/river)
357-
360+
// assert deers
358361

359362
}
360363

0 commit comments

Comments
 (0)
Please sign in to comment.