fixed move for position initial guard
This commit is contained in:
parent
570b8df4a7
commit
00137e022a
@ -44,15 +44,15 @@ legal_moves(int8_t p, const Board& b, const Coords xy, bool looking_for_check) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!looking_for_check)
|
// if (!looking_for_check)
|
||||||
return keep_only_blocking(ret, b);
|
// return keep_only_blocking(ret, b);
|
||||||
|
|
||||||
return {};
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Move>
|
std::optional<Move>
|
||||||
move_for_position(const Board& board, const Coords source, const Coords dest) {
|
move_for_position(const Board& board, const Coords source, const Coords dest) {
|
||||||
if (dest.is_within_bounds())
|
if (!dest.is_within_bounds())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
int8_t piece = board.squares[dest.to_index()];
|
int8_t piece = board.squares[dest.to_index()];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user