#include <cassert>
#include <iomanip>
#include <sstream>
-#include <string>
+#include <stack>
#include "movegen.h"
#include "notation.h"
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)