mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 15:37:47 +00:00
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>
This commit is contained in:
@@ -207,5 +207,4 @@ extern Move move_from_uci(const Position& pos, const std::string &str);
|
||||
extern const std::string move_to_uci(Move m, bool chess960);
|
||||
extern bool move_is_ok(Move m);
|
||||
|
||||
|
||||
#endif // !defined(MOVE_H_INCLUDED)
|
||||
|
||||
Reference in New Issue
Block a user