[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [computer-go] Chains and liberties



> My guess is he keeps a stack of pointer-value pairs. Upon undo he just
> writes the value at the address of the pointer, which could be in the middle

This can only work if the objects addres is not changed
between do and undo. If it were (dynamically) reallocated
in-between, the 'undo' pointer would point to graceland.

Fixed allocation or an extra layer of indirection
can be used to avoid this complication.

If the undo-structure is also used for 'redo',
there is also a necessity to keep the structures
in a 'canonical' form, such that the 'redo' operation
finds the things it expects.

[ I don't want to discuss the value of redo. It could be useless, here :-]

AvK
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/