Rewrite do_null_move()

Use a more traditional approach, along the same lines
of do_move().

It is true that we copy more in do_null_move(), but we
save the work in undo_null_move(). Speed test shows the
new code to be even a bit faster.

No functional change.
This commit is contained in:
Marco Costalba
2013-01-27 11:45:01 +01:00
parent 76a0d3c05a
commit 2218a5836a
3 changed files with 35 additions and 44 deletions

View File

@@ -154,7 +154,8 @@ public:
void do_move(Move m, StateInfo& st);
void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck);
void undo_move(Move m);
template<bool Do> void do_null_move(StateInfo& st);
void do_null_move(StateInfo& st);
void undo_null_move();
// Static exchange evaluation
int see(Move m) const;