]> git.sesse.net Git - stockfish/commit
Code style and subtle fix in move_is_legal()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 21 Sep 2009 17:07:11 +0000 (18:07 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 22 Sep 2009 06:07:19 +0000 (07:07 +0100)
commit0179a32cf5b22fdeeaf9a14aa88f49eb51f476ed
tree82b6e68e06e066f55a88970c1e5c6c1329c38c0a
parent84870690583ddbdf0a9bd51dd5d5f821b0fadb63
Code style and subtle fix in move_is_legal()

A bunch of trivial code style and comment fixes.

Among them there is a real fix for a subtle case
involving promotion moves.

We currently check that a pawn push to 8/1th rank
must be a promotion, but we don't check the contary,
i.e. that a pawn push on a different rank must NOT be
a promotion. Note that, funny enough, we perform this
control for all the other pieces, but not for the pawns!

This patch fixes this really corner case.

No functional change.

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