Split out board.c to better reflect what it's doing:
We really have 2 different board implementations, might as well give them a place to be.
board.c and board_undo.c both include board_play.h so each gets its own board_play() logic optimized for its own needs without duplicating code. Still need a few #ifdefs where logic differs but already it's so much nicer this way. For undo use board->u instead of passing undo pointer through every function (can't believe i wrote this !)
Speedup / convenience:
Configurable last moves
History: just keep last 16 hashes, should be enough for superko check.
Split out board.c to better reflect what it's doing: We really have 2 different board implementations, might as well give them a place to be.
board.c
andboard_undo.c
both includeboard_play.h
so each gets its own board_play() logic optimized for its own needs without duplicating code. Still need a few #ifdefs where logic differs but already it's so much nicer this way. For undo use board->u instead of passing undo pointer through every function (can't believe i wrote this !)Speedup / convenience:
Playouts are about 7% faster almost for free.