Remove highlight of passing move in CECP
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 30 Oct 2020 11:04:39 +0000 (12:04 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 30 Oct 2020 11:04:39 +0000 (12:04 +0100)
Input of passing by king move is invalid, so remove it (#192).

src/xboard.cpp

index 51b296d..dcd4efd 100644 (file)
@@ -127,7 +127,7 @@ void StateMachine::process_command(Position& pos, std::string token, std::istrin
           for (const auto& m : MoveList<LEGAL>(pos))
           {
               Square from = from_sq(m), to = to_sq(m);
-              if (is_ok(from) && UCI::square(pos, from) == token)
+              if (is_ok(from) && UCI::square(pos, from) == token && !is_pass(m))
               {
                   if (type_of(m) == PROMOTION)
                       promotions |= to;