board.cpp: integrate undo functionality into server commands, fix lazy evaluation error with flipping