diff --git a/ArduChess.ino b/ArduChess.ino index 8caa5ab..6f12654 100644 --- a/ArduChess.ino +++ b/ArduChess.ino @@ -2,8 +2,11 @@ #include +#include "Config.h" + #include "Board.h" #include "Move.h" +#include "Movegen.h" #include "Types.h" Board b = Board(); diff --git a/Config.h b/Config.h new file mode 100644 index 0000000..702c10f --- /dev/null +++ b/Config.h @@ -0,0 +1,3 @@ +// CLEAR_UNMAKE is a feature that clears the unmake stack when it is not used. +// This is useful for making it more human readable +//#define _ACF_CLEAR_UNMAKE diff --git a/Movegen.h b/Movegen.h new file mode 100644 index 0000000..ac9d329 --- /dev/null +++ b/Movegen.h @@ -0,0 +1,4 @@ +#ifndef __MOVEGEN_H_INC +#define __MOVEGEN_H_INC + +#endif diff --git a/Types.h b/Types.h index 1bf5080..99aeba5 100644 --- a/Types.h +++ b/Types.h @@ -20,29 +20,6 @@ enum Piece: byte { B_QUEN = 0b1111, }; -#ifdef _ACF_FAST_PIECE -Piece char_to_piece(char c) { - switch(c) { - case 'p': return W_PAWN; - case 'n': return W_KNGT; - case 'k': return W_KING; - case 'b': return W_BSHP; - case 'r': return W_ROOK; - case 'q': return W_QUEN; - - case 'P': return B_PAWN; - case 'N': return B_KNGT; - case 'K': return B_KING; - case 'B': return B_BSHP; - case 'R': return B_ROOK; - case 'Q': return B_QUEN; - - default: return P_EMPTY; - } -} - -#else // _ACF_FAST_PIECE - const char CHAR_STRS[] PROGMEM = " pnkbrq PNKBRQ"; Piece char_to_piece(char c) { for(byte i = 0; i < 0b1111; i++) { @@ -54,6 +31,5 @@ Piece char_to_piece(char c) { char piece_to_char(Piece p) { return CHAR_STRS[p]; } -#endif // _ACF_FAST_PIECE #endif