Board implements Serializable { public Legality playFast(short p) { final Legality result = legalityFast(colorToPlay, p); if (result != OK) { return result; } finalizePlay(colorToPlay, p); colorToPlay = colorToPlay.opposite(); passes = 0; turn++; notifyObservers(colorToPlay.opposite(), p); return OK; } Board(int width); void addObserver(BoardObserver observer); void clear(); void clearPreservingInitialStones(); void copyDataFrom(Board that); short getChainNextPoint(short p); short getChainRoot(short p); Color getColorAt(short p); StoneColor getColorToPlay(); CoordinateSystem getCoordinateSystem(); long getFancyHash(); long getHash(); ShortSet getLiberties(short p); int getNeighborsOfColor(short p, Color color); short getPasses(); int getTurn(); ShortSet getVacantPoints(); boolean hasMaxNeighborsForColor(StoneColor color, short p); boolean isLegal(short p); void pass(); void placeInitialStone(StoneColor color, short p); Legality play(short p); Legality play(String move); Legality playFast(short p); void setColorToPlay(StoneColor stoneColor); void setPasses(short passes); void setUpHandicap(int handicapSize); void setUpProblem(String[] diagram, StoneColor colorToPlay); @Override String toString(); void removeStones(ShortSet ourDead);  }
@Test public void testPlayFast() { String[] before = { ".#O.O", "#O.O#", "...#.", "O#..#", ".O#..", }; board.setUpProblem(before, WHITE); assertEquals(OK, board.playFast(at("a5"))); assertEquals(OK, board.playFast(at("a1"))); assertEquals(OK, board.playFast(at("e3"))); assertEquals(OK, board.playFast(at("b5"))); assertEquals(OK, board.playFast(at("b1"))); assertEquals(OK, board.playFast(at("e4"))); assertEquals(asOneString(before), board.toString()); }