Fix bug in rebuild occ
All checks were successful
Python tests (make) / test (push) Successful in 12s
All checks were successful
Python tests (make) / test (push) Successful in 12s
We need to init the variables in the loops first. int p=p doesn't work.
This commit is contained in:
@@ -604,8 +604,8 @@ void rebuild_occ(struct Board *board) {
|
||||
uint64_t white=0;
|
||||
uint64_t black=0;
|
||||
|
||||
for (int p = P; p <= K; ++p) white |= board->pieces[p];
|
||||
for (int p = p; p <= k; ++p) black |= board->pieces[p];
|
||||
for (int i = P; i <= K; ++i) white |= board->pieces[i];
|
||||
for (int i = p; i <= k; ++i) black |= board->pieces[i];
|
||||
|
||||
board->occ[WHITE] = white;
|
||||
board->occ[BLACK] = black;
|
||||
|
||||
Reference in New Issue
Block a user