ShapeSuggester implements Suggester { @Override public ShortSet getMoves() { moves.clear(); for (short p : coords.getAllPointsOnBoard()) { if (board.getColorAt(p) == VACANT) { long hash = PatternFinder.getHash(board, p, minStones, history.get(board.getTurn()-1)); if (shapeTable.getWinRate(hash) > shapeThreshold) { moves.add(p); } } } return moves; } ShapeSuggester(Board board, HistoryObserver history, ShapeTable shapeTable, double shapeThreshold, int minStones);  ShapeSuggester(Board board, HistoryObserver history, ShapeTable shapeTable, double shapeThreshold, int minStones, int bias); @Override int getBias(); @Override ShortSet getMoves(); void setTable(ShapeTable shapeTable);  }
@Test public void testGetMoves() { String[] diagram = { ".........", "OO.OO....", ".........", ".........", ".........", "OO.......", ".........", "OO.##....", "OO.OO....", }; board.setUpProblem(diagram, BLACK); long hash = PatternFinder.getHash(board, board.getCoordinateSystem().at("c8"), 4, history.get(board.getTurn()-1)); for(int i = 0; i < 500; i++){ shapeTable.update(hash, true); } assertEquals(board.getCoordinateSystem().at("c8"), suggester.getMoves().get(0)); }