10 using namespace osl::game_playing;
11 using namespace osl::record;
12 using namespace osl::record::opening;
23 NumEffectState* state)
25 std::cout <<
"<moves>" << std::endl;
27 if (moves.size() == 0)
29 std::cout <<
"No more moves in the book" << std::endl;
32 for (
size_t i = 0; i < moves.size(); i++)
34 std::cout <<
"<move>" << std::endl;
35 std::cout <<
psn::show(moves[i].getMove()) << std::endl;
40 NumEffectState newState(*state);
41 newState.makeMove(moves[i].getMove());
42 std::cout <<
"<board>" << std::endl;
43 std::cout << newState << std::endl;
44 std::cout <<
"</board>" << std::endl;
46 std::cout <<
"</move>" << std::endl;
48 std::cout <<
"</moves>" << std::endl;
51 int main(
int argc,
char **argv)
58 char *programName = argv[0];
59 bool showNextMoves =
false;
60 bool showBoards =
false;
62 bool unknownOption =
false;
65 while ((c = getopt(argc, argv,
"nst")) != EOF)
88 std::cerr <<
"Usage: " << programName <<
" [-n] [-s] [-t]" << std::endl
89 <<
"[-n show next moves] "
90 <<
"[-s show boards] "
91 <<
"[-t show next moves for every move]"
104 while (!std::getline(std::cin, line).eof())
108 state.makeMove(move);
115 if (tracer.isOutOfBook())
117 std::cout <<
"Out of Book" << std::endl;
122 std::cout <<
"<total>" << std::endl;
126 std::cout <<
"<board>" << std::endl;
127 std::cout << state << std::endl;
128 std::cout <<
"</board>" << std::endl;
130 std::cout <<
"</total>" << std::endl;
132 if (showNextMoves && !trace)