Book { public final String getAllBookMoves(Position pos) { initBook(); StringBuilder ret = new StringBuilder(); List<BookEntry> bookMoves = bookMap.get(pos.zobristHash()); if (bookMoves != null) { for (BookEntry be : bookMoves) { String moveStr = TextIO.moveToString(pos, be.move, false); ret.append(moveStr); ret.append("("); ret.append(be.count); ret.append(") "); } } return ret.toString(); } Book(boolean verbose); final Move getBookMove(Position pos); final String getAllBookMoves(Position pos);  }
@Test public void testGetAllBookMoves() throws ChessParseError { System.out.println("getAllBookMoves"); Position pos = TextIO.readFEN(TextIO.startPosFEN); Book book = new Book(true); String moveListString = book.getAllBookMoves(pos); String[] strMoves = moveListString.split("\\([0-9]*\\) "); assertTrue(strMoves.length > 1); for (String strMove : strMoves) { Move m = TextIO.stringToMove(pos, strMove); checkValid(pos, m); } }