void brain_init() { if(width<5 || height < 5){ pipeOut("ERROR Invalid size of the board"); return; } if(width > MAX_BOARD_SIZE || height>MAX_BOARD_SIZE){ pipeOut("ERROR Maximal board size is %d", MAX_BOARD_SIZE); return; } brain_restart(); }
void brain_init() { if(width<5 || height < 5){ pipeOut("ERROR Invalid size of the board"); return; } if(width > MAX_BOARD_WIDTH){ pipeOut("ERROR Maximal board width is %d", MAX_BOARD_WIDTH); return; } if(height > MAX_BOARD_HEIGHT){ pipeOut("ERROR Maximal board height is %d", MAX_BOARD_HEIGHT); return; } brain_restart(); }
void brain_turn() { int x, y; ai->yourTurn(x, y); ai->move(x, y); pipeOut("%d,%d", x, y); }
void WriteLog(int points, int nSearched, int speed, int depth, bool debug) { pipeOut("%s eval %d, depth %d, nodes %d, speed %d", debug ? "DEBUG" : "MESSAGE", points, depth, nSearched, speed); }
void brain_restart() { if(!ai) ai = new AICarbon(); ai->start(width, height); pipeOut("OK"); }
void brain_block(int x, int y) { pipeOut("ERROR brain_block not implemented"); }