#include "chess.hpp"
int main() {
chess::Board board = chess::Board("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
while (true)
{
int type = 0;
std::string move;
std::cin >> type >> move;
if (type == 0)
{
board.makeMove(chess::uci::uciToMove(board, move));
}
else board.unmakeMove(chess::uci::uciToMove(board, move));
std::cerr << board << std::endl;
}
return 0;
}
I2luY2x1ZGUgImNoZXNzLmhwcCIKCmludCBtYWluKCkgewogICAgY2hlc3M6OkJvYXJkIGJvYXJkID0gY2hlc3M6OkJvYXJkKCJybmJxa2Juci9wcHBwcHBwcC84LzgvOC84L1BQUFBQUFBQL1JOQlFLQk5SIHcgS1FrcSAtIDAgMSIpOwogICAgd2hpbGUgKHRydWUpCiAgICB7CiAgICAgICAgaW50IHR5cGUgPSAwOwogICAgICAgIHN0ZDo6c3RyaW5nIG1vdmU7CgkJc3RkOjpjaW4gPj4gdHlwZSA+PiBtb3ZlOwogICAgICAgIGlmICh0eXBlID09IDApCiAgICAgICAgewogICAgICAgICAgICBib2FyZC5tYWtlTW92ZShjaGVzczo6dWNpOjp1Y2lUb01vdmUoYm9hcmQsIG1vdmUpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBib2FyZC51bm1ha2VNb3ZlKGNoZXNzOjp1Y2k6OnVjaVRvTW92ZShib2FyZCwgbW92ZSkpOwoJCXN0ZDo6Y2VyciA8PCBib2FyZCA8PCBzdGQ6OmVuZGw7CiAgICB9CiAgICByZXR1cm4gMDsKfQ==
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