Remove ACF_FAST_PIECE feature
This commit is contained in:
parent
0b75a0c169
commit
c69d0b96d5
|
|
@ -2,8 +2,11 @@
|
|||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "Board.h"
|
||||
#include "Move.h"
|
||||
#include "Movegen.h"
|
||||
#include "Types.h"
|
||||
|
||||
Board b = Board();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef __MOVEGEN_H_INC
|
||||
#define __MOVEGEN_H_INC
|
||||
|
||||
#endif
|
||||
24
Types.h
24
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue