]> git.sesse.net Git - stockfish/commit
Change move_is_ok() and square_is_ok() in something useful
authorMarco Costalba <mcostalba@gmail.com>
Thu, 6 Jan 2011 09:32:27 +0000 (10:32 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 6 Jan 2011 09:55:48 +0000 (10:55 +0100)
commit5fc8f86a4f37de0e919c163c81f04b8717a70d3f
tree1ec25fa5fbdfabbf2065839c6325ccb44b335b02
parentc14dae1fa20507e3f3c729ee9de6ed55ab11dba6
Change move_is_ok() and square_is_ok() in something useful

As is defined now is always true, tested with:

  for (long i=-1000000; i < 1000000; i++)
      if (!move_is_ok(Move(i)))
          exit(0);

Reason is that move_from() and move_to() already truncate the
input value to something in the range [0, 63] that is always
a possible square.

So change definition to something useful.

The same applies also to square_is_ok()

No functional change.

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