mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Update piece list iteration also in evaluate_pieces()
Move to what we already do in generate_piece_moves() This simple patch gives a spped up of 1.4% !! No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
6bf22f354f
commit
91f0c08789
1 changed files with 2 additions and 3 deletions
|
@ -614,11 +614,10 @@ namespace {
|
|||
int mob;
|
||||
File f;
|
||||
Color them = opposite_color(us);
|
||||
const Square* ptr = pos.piece_list_begin(us, Piece);
|
||||
|
||||
for (int i = 0, e = pos.piece_count(us, Piece); i < e; i++)
|
||||
while ((s = *ptr++) != SQ_NONE)
|
||||
{
|
||||
s = pos.piece_list(us, Piece, i);
|
||||
|
||||
if (Piece == KNIGHT || Piece == QUEEN)
|
||||
b = pos.attacks_from<Piece>(s);
|
||||
else if (Piece == BISHOP)
|
||||
|
|
Loading…
Add table
Reference in a new issue