gochatai/pachi_py/pachi/board.c
/* Undo, supported only for pass moves. This form of undo is required by KGS
 * to settle disputes on dead groups. (Undo of real moves would be more complex
 * particularly for capturing moves.) */
Undo, supported only for pass moves. This form of undo is required by KGS
to settle disputes on dead groups. (Undo of real moves would be more complex
particularly for capturing moves.)
Undo supported only for pass moves . This form of undo is required by KGS to settle disputes on dead groups . ( Undo of real moves would be more complex particularly for capturing moves . )
int board_undo(struct board *board)
{
	if (!is_pass(board->last_move.coord))
		return -1;
	if (board->rules == RULES_SIMING) {
		board->captures[stone_other(board->last_move.color)]--;
	}
	board->last_move = board->last_move2;
	board->last_move2 = board->last_move3;
	board->last_move3 = board->last_move4;
	if (board->last_ko_age == board->moves)
		board->ko = board->last_ko;
	return 0;
}
int board_undo ( struct board * board ) { if ( ! is_pass ( board -> last_move . coord ) ) return -1 ; if ( board -> rules == RULES_SIMING ) { board -> captures [ stone_other ( board -> last_move . color ) ] -- ; } board -> last_move = board -> last_move2 ; board -> last_move2 = board -> last_move3 ; board -> last_move3 = board -> last_move4 ; if ( board -> last_ko_age == board -> moves ) board -> ko = board -> last_ko ; return 0 ; }
Undo, supported only for pass moves.
Undo supported only for pass moves .
/* Return pass stone to the passing player. */