#include "board.hpp" #include "fen.hpp" #include "moves.hpp" #include "uci.hpp" #include "zobrist.hpp" #include #include #include #include using namespace std; enum Mode { EXIT, REPL, }; void setAllPiecesToEmpty(Game *b) { Piece EmptyPiece = { false, NONE, false, }; for (int i = 0; i < 64; i++) { b->pieces[i] = EmptyPiece; }; }; Game initBoard(string startingFEN) { Game b; b.enPassant = IndexToPosition(0); // default value b.canEnpassant = false; b.state = TURN; b.turn = true; b.castle = ""; b.halfMoveClock = 0; b.MoveClock = 0; setBoardFen(startingFEN, &b); return b; }; int main(int argc, char **argv) { InitZobrist(); srand(time(0)); if (argc < 1 || argc > 2) { printf("wrong arg count, use: ./chess [--repl for debugging]\n"); return 1; } if (argc > 1 && std::string(argv[1]) == "--repl") return startREPL(); Uci(); return 0; }