#include #include #include #include "board.hpp" Piece NonePiece = { false, NONE, false, }; int main(int argc, char **argv) { printf("arg count: %d", argc); std::string startingFen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"; if (argc < 1 || argc > 2) { printf("wrong arg count, use: ./chess [optinal starting fen]"); return 1; } if (argc == 2) { startingFen = argv[1]; } board b; b.turn = true; b.castle = ""; b.halfMoveClock = 0; b.MoveClock = 0; for (int i = 0; i < 64; i++) { b.pieces[i] = NonePiece; }; setBoardFen(startingFen, &b); printBoard(&b); return EXIT_SUCCESS; }