- Square from, to;
- Piece piece;
- Color us = pos.side_to_move();
-
- if (str.length() < 4)
- return MOVE_NONE;
-
- // Read the from and to squares
- from = make_square(file_from_char(str[0]), rank_from_char(str[1]));
- to = make_square(file_from_char(str[2]), rank_from_char(str[3]));
-
- // Find the moving piece
- piece = pos.piece_on(from);
-
- // If the string has more than 4 characters, try to interpret the 5th
- // character as a promotion.
- if (str.length() > 4 && piece == piece_of_color_and_type(us, PAWN))
- {
- switch (tolower(str[4])) {
- case 'n':
- return make_promotion_move(from, to, KNIGHT);
- case 'b':
- return make_promotion_move(from, to, BISHOP);
- case 'r':
- return make_promotion_move(from, to, ROOK);
- case 'q':
- return make_promotion_move(from, to, QUEEN);
- }
- }
+ else if (token == "uci")
+ cout << "id name " << engine_name()
+ << "\nid author " << engine_authors()
+ << "\n" << Options.print_all()
+ << "\nuciok" << endl;
+ else
+ cout << "Unknown command: " << cmd << endl;
+ }
+}