diff --git a/Tasks.h b/Tasks.h index 441bbd3..ec7ca2b 100644 --- a/Tasks.h +++ b/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) { - Board::make(m); - if(!Threat::illegal()) { - move_count += pseudo_perft(depth-1); - } else { - //Board::print(); - } - Board::unmake(); - } else { - break; - } + while((m = gen.next_move()).sq_to != 255) { + Board::make(m); + move_count += pseudo_perft(depth-1); + Board::unmake(); } return move_count; }