- // position just before to start searching). This is needed by draw detection.
- std::vector<StateInfo> SetupState;
-
- // UCIParser is a class for parsing UCI input. The class
- // is actually a string stream built on a given input string.
- typedef istringstream UCIParser;
-
- void set_option(UCIParser& up);
- void set_position(Position& pos, UCIParser& up);
- bool go(Position& pos, UCIParser& up);
- void perft(Position& pos, UCIParser& up);
+ // position just before to start searching). This is needed by draw detection
+ // where, due to 50 moves rule, we need to check at most 100 plies back.
+ StateInfo StateRingBuf[102], *SetupState = StateRingBuf;
+
+ void set_option(istringstream& up);
+ void set_position(Position& pos, istringstream& up);
+ bool go(Position& pos, istringstream& up);
+ void perft(Position& pos, istringstream& up);