#include "material.h"
#include "pawns.h"
#include "thread.h"
-#include "ucioption.h"
+#include "uci.h"
namespace {
assert(target & (pos.pieces(C) ^ pos.pieces(C, KING)));
PieceType pt;
- for (pt = QUEEN; !(target & pos.pieces(C, pt)); --pt) {}
+ for (pt = QUEEN; pt >= KNIGHT; --pt)
+ if (target & pos.pieces(C, pt))
+ break;
+
return pt;
}