21 #include "CmdLineInterface.h" 25 CmdLineInterface::CmdLineInterface()
29 CmdLineInterface::~CmdLineInterface()
33 void CmdLineInterface::start(
char argc,
char **argv)
62 state.white.queen.
clear(); state.white.king.
clear(); state.white.bishops.
clear();
64 state.black.queen.
clear(); state.black.king.
clear(); state.black.bishops.
clear();
66 for (
int i = 7; i >= 0; i--)
69 for(
int j = 0; j < 8; j++)
71 fread(&c, 1, 1, stdin);
77 case 'P': state.black.
pawns.
set(blackSq.row, blackSq.col);
break;
78 case 'R': state.black.rooks.
set(blackSq.row, blackSq.col);
break;
79 case 'B': state.black.bishops.
set(blackSq.row, blackSq.col);
break;
80 case 'H': state.black.knights.
set(blackSq.row, blackSq.col);
break;
81 case 'Q': state.black.queen.
set(blackSq.row, blackSq.col);
break;
82 case 'K': state.black.king.
set(blackSq.row, blackSq.col);
break;
83 case 'p': state.white.
pawns.
set(whiteSq.row, whiteSq.col);
break;
84 case 'r': state.white.rooks.
set(whiteSq.row, whiteSq.col);
break;
85 case 'b': state.white.bishops.
set(whiteSq.row, whiteSq.col);
break;
86 case 'h': state.white.knights.
set(whiteSq.row, whiteSq.col);
break;
87 case 'q': state.white.queen.
set(whiteSq.row, whiteSq.col);
break;
88 case 'k': state.white.king.
set(whiteSq.row, whiteSq.col);
break;
91 fread(&c, 1, 1, stdin);
bool searchComplete() volatile
void startSearch(Side s, int minD, int maxD)
bool set(int rank, int file)
bool clear(int rank, int file)