fork download
  1. #include "chess.hpp"
  2.  
  3. int main() {
  4. chess::Board board = chess::Board("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
  5. while (true)
  6. {
  7. int type = 0;
  8. std::string move;
  9. std::cin >> type >> move;
  10. if (type == 0)
  11. {
  12. board.makeMove(chess::uci::uciToMove(board, move));
  13. }
  14. else board.unmakeMove(chess::uci::uciToMove(board, move));
  15. std::cerr << board << std::endl;
  16. }
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
#include "chess.hpp"
^
Main.java:1: error: class, interface, or enum expected
#include "chess.hpp"
         ^
Main.java:5: error: class, interface, or enum expected
    while (true)
    ^
Main.java:8: error: class, interface, or enum expected
        std::string move;
        ^
Main.java:9: error: class, interface, or enum expected
		std::cin >> type >> move;
		^
Main.java:10: error: class, interface, or enum expected
        if (type == 0)
        ^
Main.java:13: error: class, interface, or enum expected
        }
        ^
Main.java:15: error: class, interface, or enum expected
		std::cerr << board << std::endl;
		^
Main.java:16: error: class, interface, or enum expected
    }
    ^
Main.java:18: error: class, interface, or enum expected
}
^
10 errors
stdout
Standard output is empty