mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Mimic an iterator for looping across MoveList
Seems more conventional. No functional change.
This commit is contained in:
@@ -408,8 +408,8 @@ const string Position::pretty(Move move) const {
|
||||
ss << square_to_string(pop_lsb(&b)) << " ";
|
||||
|
||||
ss << "\nLegal moves: ";
|
||||
for (MoveList<LEGAL> ml(*this); !ml.end(); ++ml)
|
||||
ss << move_to_san(*const_cast<Position*>(this), ml.move()) << " ";
|
||||
for (MoveList<LEGAL> it(*this); !it.end(); ++it)
|
||||
ss << move_to_san(*const_cast<Position*>(this), *it) << " ";
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user