Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Schinc committed Mar 22, 2024
1 parent f64958c commit c595780
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ChickenAttackerInitialBoardTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,15 @@ void testRiverSystemArea() {

@Test
void testLastPlacedTile() {
Board board = getStandardBoard();
PlacedTile placedTile61 = new PlacedTile(Tiles.TILES.get(61), PlayerColor.RED, Rotation.LEFT, new Pos(3, 1));
PlacedTile placedTile62 = new PlacedTile(Tiles.TILES.get(62), PlayerColor.RED, Rotation.NONE, new Pos(4, 1));

Tile tile42 = TileReader.readTileFromCSV(42);
PlacedTile placedTile42 = new PlacedTile(tile42, PlayerColor.RED, Rotation.LEFT, new Pos(3, 1));
Board board = Board.EMPTY.withNewTile(placedTile61);

assertEquals(placedTile42, board.lastPlacedTile());
assertEquals(placedTile61, board.lastPlacedTile());
assertEquals(placedTile62, board.withNewTile(placedTile62).lastPlacedTile());

assertNull(Board.EMPTY.lastPlacedTile());
}

@Test
Expand Down

0 comments on commit c595780

Please sign in to comment.