]> git.sesse.net Git - stockfish/commit
Rewrite do_castle_move()
authorMarco Costalba <mcostalba@gmail.com>
Sun, 27 Jan 2013 17:48:27 +0000 (18:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 28 Jan 2013 12:40:47 +0000 (13:40 +0100)
commit483c98a69e8c6836c655d92a150d70fbe780341f
treed59521269160de79c6edc75d718937094f580a38
parent2218a5836a48a764e9b57f5996520b48e0b3d236
Rewrite do_castle_move()

And handle the castle directly in do/undo_move().
This allow to greatly simplify the code.

Here the beast is the nasty Chess960 that is
really tricky to get it right because could be
that 'from' and 'to' squares are the same or
that king's 'to' square is rook's 'from' square.

Anyhow should work: verified on all Chess960
starting positions.

No functional and no speed change also in Chess960.
src/position.cpp
src/position.h