MCPcopy Index your code
hub / github.com/coding-parrot/chess-engine / otherBoard

Method otherBoard

src/test/java/EngineTest.java:22–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 }
21
22 @Test
23 public void otherBoard() {
24 Board board = Board.getStartBoard();
25 board.makeMove(Move.get(board.getPiece(1, 4), Cell.get(3, 4), false));
26 Engine engine = new Engine();
27 board = board.copy();
28 board.makeMove(Move.get(board.getPiece(6, 3), Cell.get(5, 3), false));
29 board = board.copy();
30 board.makeMove(Move.get(board.getPiece(3, 4), Cell.get(4, 4), false));
31 board = board.copy();
32 board.makeMove(Move.get(board.getPiece(6, 5), Cell.get(4, 5), false));
33// board = board.copy();
34// board.makeMove(board.getPiece(4, 4).getMoveList(board).stream().filter(c -> c.captureMove).filter(c -> c.captureCell.equals(Cell.get(4, 5))).findAny().get());
35 final int positions = engine.countAllMoves(board, 2);
36 System.out.println(board);
37 System.out.println("NUMBER OF POSITIONS: " + positions);
38 System.out.println(board.fenRepresentation());
39 Assert.assertEquals(729, positions);
40 }
41
42 @Test
43 public void countMovesAfterMove() {

Callers

nothing calls this directly

Calls 8

getStartBoardMethod · 0.95
makeMoveMethod · 0.95
getMethod · 0.95
getPieceMethod · 0.95
getMethod · 0.95
copyMethod · 0.95
countAllMovesMethod · 0.95
fenRepresentationMethod · 0.95

Tested by

no test coverage detected