]> git.sesse.net Git - stockfish/commit
Simplify move legality check for uncommon cases
authorMarco Costalba <mcostalba@gmail.com>
Mon, 21 Sep 2009 10:54:25 +0000 (11:54 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 22 Sep 2009 06:07:18 +0000 (07:07 +0100)
commit84870690583ddbdf0a9bd51dd5d5f821b0fadb63
tree7dd68e4ebca30e88baa7d6a1e7ee1b31e1bd718c
parent43ca5c926dfaf13d64d51c4085070209f4c5f452
Simplify move legality check for uncommon cases

Remove a bunch of difficult and tricky code to test
legality of castle and ep moves and instead use a slower
but simpler check against the list of generated legal moves.

Because these moves are very rare the performance impact
is small but code semplification is ver big: almost 100 lines
of difficult code removed !

No functionality change. No performance change (strangely enough
there is no even minimal performance regression in pgo builds but
instead a slightly and unexpected increase).

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/book.cpp
src/movegen.cpp
src/movegen.h
src/search.cpp