Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Schinc committed Mar 25, 2024
1 parent 4da5e20 commit 5a4096c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions ChickenAttackerInitialGameStateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,23 @@ void testGame() {
assertEquals("Player YELLOW has closed a forest with a menhir.", branch2.messageBoard().messages().getLast().text());

assertEquals(PlayerColor.YELLOW, branch2.currentPlayer());
assertEquals(GameState.Action.PLACE_TILE, branch2.nextAction());

branch2 = branch2.withPlacedTile(
new PlacedTile(
Tiles.TILES.get(88),
branch2.currentPlayer(),
Rotation.HALF_TURN,
new Pos(2, -1)
)
);

assertEquals(GameState.Action.RETAKE_PAWN, branch2.nextAction());

branch2 = branch2.withOccupantRemoved(occupant1T);
assertEquals(0, branch2.board().occupantCount(PlayerColor.YELLOW, Occupant.Kind.PAWN));

assertEquals(GameState.Action.PLACE_TILE, branch2.nextAction());
assertEquals(PlayerColor.RED, branch2.currentPlayer());



// at the end of the game
// assert currentPlayer is null
Expand Down

0 comments on commit 5a4096c

Please sign in to comment.