Compare commits
2 Commits
1ca79fa2ca
...
c6ea3de822
| Author | SHA1 | Date |
|---|---|---|
|
|
c6ea3de822 | |
|
|
5112d298ed |
|
|
@ -26,8 +26,6 @@ class Movegen {
|
|||
|
||||
Move Movegen::next_move() {
|
||||
while(square <= 0x77) {
|
||||
if(square & 0x88) square += 8;
|
||||
|
||||
byte piece_type = Board::field[square] & 0x7;
|
||||
|
||||
if(
|
||||
|
|
@ -49,6 +47,7 @@ Move Movegen::next_move() {
|
|||
}
|
||||
}
|
||||
square++;
|
||||
if(square & 0x88) square += 8;
|
||||
direction = 0;
|
||||
target_square = square;
|
||||
}
|
||||
|
|
|
|||
11
Tasks.h
11
Tasks.h
|
|
@ -14,19 +14,10 @@ unsigned long pseudo_perft(byte depth) {
|
|||
Movegen gen;
|
||||
Move m;
|
||||
|
||||
while (true) {
|
||||
m = gen.next_move();
|
||||
if(m.sq_to != 255) {
|
||||
while((m = gen.next_move()).sq_to != 255) {
|
||||
Board::make(m);
|
||||
if(!Threat::illegal()) {
|
||||
move_count += pseudo_perft(depth-1);
|
||||
} else {
|
||||
//Board::print();
|
||||
}
|
||||
Board::unmake();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return move_count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue