class PredicateMover implements Mover {

	@Override
	public short selectAndPlayOneMove(MersenneTwisterFast random, boolean fast) {
		candidates.clear();
		candidates.addAll(board.getVacantPoints());
		while (candidates.size() > 0) {
			final short p = candidates.removeRandom(random);
			if (board.getColorAt(p) == VACANT && filter.at(p)) {
				Legality legality = fast ? board.playFast(p) : board.play(p);
				if (legality == OK) {
					return p;
				}
			}	
		} 
		board.pass();
		return PASS;
	}

	public  PredicateMover(Board board, Predicate filter);

}