Better naming of pseudo-legality and legality testing

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2008-10-25 16:39:24 +01:00
parent 4f14bd5032
commit 4397e6c03e
6 changed files with 42 additions and 42 deletions

View File

@@ -161,14 +161,14 @@ Move move_from_san(Position &pos, const std::string &movestr) {
if(movestr == "O-O-O") {
Move m;
while((m = mp.get_next_move()) != MOVE_NONE)
if(move_is_long_castle(m) && pos.move_is_legal(m))
if(move_is_long_castle(m) && pos.pl_move_is_legal(m))
return m;
return MOVE_NONE;
}
else if(movestr == "O-O") {
Move m;
while((m = mp.get_next_move()) != MOVE_NONE)
if(move_is_short_castle(m) && pos.move_is_legal(m))
if(move_is_short_castle(m) && pos.pl_move_is_legal(m))
return m;
return MOVE_NONE;
}
@@ -358,7 +358,7 @@ namespace {
n = 0;
while((mv = mp.get_next_move()) != MOVE_NONE)
if(move_to(mv) == to && pos.piece_on(move_from(mv)) == pc
&& pos.move_is_legal(mv))
&& pos.pl_move_is_legal(mv))
moveList[n++] = mv;
if(n == 1)
return AMBIGUITY_NONE;