#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) {}
- return pt;
+ for (PieceType pt = QUEEN; pt > PAWN; --pt)
+ if (target & pos.pieces(C, pt))
+ return pt;
+
+ return PAWN;
}