Retire Position::move_is_legal()

Use the new contains() method of struct MoveList

No functional change.
This commit is contained in:
Marco Costalba
2012-12-25 11:40:28 +01:00
parent 423c6d8a8a
commit 3b49aeb4f2
5 changed files with 10 additions and 19 deletions

View File

@@ -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];