Rename MoveStack to ExtMove

Stack has no meaning here, while ExtMove (extended move),
better clarifies that we have a move + a score.

No functional change.
This commit is contained in:
Marco Costalba
2013-07-19 10:27:15 +02:00
parent 110644d918
commit 99e547f4cb
5 changed files with 33 additions and 33 deletions

View File

@@ -34,7 +34,7 @@ enum GenType {
class Position;
template<GenType>
MoveStack* generate(const Position& pos, MoveStack* mlist);
ExtMove* generate(const Position& pos, ExtMove* mlist);
/// The MoveList struct is a simple wrapper around generate(), sometimes comes
/// handy to use this class instead of the low level generate() function.
@@ -46,13 +46,13 @@ struct MoveList {
Move operator*() 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;
for (const ExtMove* it(mlist); it != last; ++it) if (it->move == m) return true;
return false;
}
private:
MoveStack mlist[MAX_MOVES];
MoveStack *cur, *last;
ExtMove mlist[MAX_MOVES];
ExtMove *cur, *last;
};
#endif // !defined(MOVEGEN_H_INCLUDED)