#include <cassert>
#include <iomanip>
#include <sstream>
-#include <string>
+#include <stack>
#include "movegen.h"
#include "notation.h"
if (m == MOVE_NULL)
return "(null)";
- assert(pos.move_is_legal(m));
+ assert(MoveList<LEGAL>(pos).contains(m));
Bitboard attackers;
bool ambiguousMove, ambiguousFile, ambiguousRank;
const int64_t K = 1000;
const int64_t M = 1000000;
- StateInfo state[MAX_PLY_PLUS_2], *st = state;
+ std::stack<StateInfo> st;
Move* m = pv;
string san, padding;
size_t length;
s << san << ' ';
length += san.length() + 1;
- pos.do_move(*m++, *st++);
+ st.push(StateInfo());
+ pos.do_move(*m++, st.top());
}
while (m != pv)