Make pseudo-perft actually pseudo
This commit is contained in:
parent
5112d298ed
commit
c6ea3de822
17
Tasks.h
17
Tasks.h
|
|
@ -14,19 +14,10 @@ unsigned long pseudo_perft(byte depth) {
|
||||||
Movegen gen;
|
Movegen gen;
|
||||||
Move m;
|
Move m;
|
||||||
|
|
||||||
while (true) {
|
while((m = gen.next_move()).sq_to != 255) {
|
||||||
m = gen.next_move();
|
Board::make(m);
|
||||||
if(m.sq_to != 255) {
|
move_count += pseudo_perft(depth-1);
|
||||||
Board::make(m);
|
Board::unmake();
|
||||||
if(!Threat::illegal()) {
|
|
||||||
move_count += pseudo_perft(depth-1);
|
|
||||||
} else {
|
|
||||||
//Board::print();
|
|
||||||
}
|
|
||||||
Board::unmake();
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return move_count;
|
return move_count;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue