mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Retire Position::move_is_legal()
Use the new contains() method of struct MoveList No functional change.
This commit is contained in:
@@ -46,6 +46,10 @@ struct MoveList {
|
||||
bool end() const { return cur == last; }
|
||||
Move move() const { return cur->move; }
|
||||
size_t size() const { return last - mlist; }
|
||||
bool contains(Move m) const {
|
||||
for (const MoveStack* it(mlist) ; it != last; ++it) if (it->move == m) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
MoveStack mlist[MAX_MOVES];
|
||||
|
||||
Reference in New Issue
Block a user