target = ~pos.pieces();
break;
case EVASIONS:
+ {
+ if (pos.checkers() & pos.non_sliding_riders())
+ {
+ target = ~pos.pieces(Us);
+ break;
+ }
- Square checksq = lsb(pos.checkers());
- target = between_bb(pos.square<KING>(Us), checksq) | checksq;
+ target = between_bb(pos.square<KING>(Us), lsb(pos.checkers())) | pos.checkers();
+ // Leaper attacks can not be blocked
++ Square checksq = lsb(pos.checkers());
+ if (LeaperAttacks[~Us][type_of(pos.piece_on(checksq))][checksq] & pos.square<KING>(Us))
- target = square_bb(checksq);
++ target = pos.checkers();
break;
+ }
case NON_EVASIONS:
target = ~pos.pieces(Us);
break;
else if (token == "d") sync_cout << pos << sync_endl;
else if (token == "eval") trace_eval(pos);
else if (token == "compiler") sync_cout << compiler_info() << sync_endl;
+ else if (token == "load") { load(is); argc = 1; } // continue reading stdin
+ else if (token == "check") check(is);
+ // UCI-Cyclone omits the "position" keyword
+ else if (token == "fen" || token == "startpos")
+ {
+#ifdef LARGEBOARDS
+ if (Options["Protocol"] == "uci" && Options["UCI_Variant"] == "chess")
+ {
+ Options["Protocol"].set_default("ucicyclone");
+ Options["UCI_Variant"].set_default("xiangqi");
+ }
+#endif
+ is.seekg(0);
+ position(pos, is, states);
+ }
- else
+ else if (!token.empty() && token[0] != '#')
sync_cout << "Unknown command: " << cmd << sync_endl;
} while (token != "quit" && argc == 1); // Command line args are one-shot