mirror of
https://github.com/sockspls/badfish
synced 2025-07-12 03:59:15 +00:00
Small tidy up in move_to_san
No functional change.
This commit is contained in:
parent
d28ea7b518
commit
698b645e10
1 changed files with 12 additions and 12 deletions
|
@ -132,14 +132,15 @@ const string move_to_san(Position& pos, Move m) {
|
||||||
|
|
||||||
while (b)
|
while (b)
|
||||||
{
|
{
|
||||||
Move move = make_move(pop_lsb(&b), to);
|
Square sq = pop_lsb(&b);
|
||||||
if (!pos.legal(move, pos.pinned_pieces(pos.side_to_move())))
|
if (!pos.legal(make_move(sq, to), pos.pinned_pieces(us)))
|
||||||
others ^= from_sq(move);
|
others ^= sq;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (others)
|
if (!others)
|
||||||
{
|
{ /* disambiguation is not needed */ }
|
||||||
if (!(others & file_bb(from)))
|
|
||||||
|
else if (!(others & file_bb(from)))
|
||||||
san += to_char(file_of(from));
|
san += to_char(file_of(from));
|
||||||
|
|
||||||
else if (!(others & rank_bb(from)))
|
else if (!(others & rank_bb(from)))
|
||||||
|
@ -148,7 +149,6 @@ const string move_to_san(Position& pos, Move m) {
|
||||||
else
|
else
|
||||||
san += to_string(from);
|
san += to_string(from);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (pos.capture(m))
|
else if (pos.capture(m))
|
||||||
san = to_char(file_of(from));
|
san = to_char(file_of(from));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue