There are several methods that require each turtle instance to track its own drawing commands: undo(), clear(), clearstamp(), and clearstamps(). clear() seems like it's equivalent to "undo all".
Keep track of the stamp commands in a turtle instance's history, and remove them if requested. stamp() will need to return a stamp id that can be passed to clearstamp(). Check whether the standard implementation tracks a separate list of stamps for each turtle instance. Does clearstamps() clear the stamps of all instances? Note that clearing a stamp removes it from the undo buffer.
How does the undo buffer interact with clearstamp()? Once a stamp falls out of the undo buffer, can it still be cleared?
There are several methods that require each turtle instance to track its own drawing commands:
undo()
,clear()
,clearstamp()
, andclearstamps()
.clear()
seems like it's equivalent to "undo all".Keep track of the stamp commands in a turtle instance's history, and remove them if requested.
stamp()
will need to return a stamp id that can be passed toclearstamp()
. Check whether the standard implementation tracks a separate list of stamps for each turtle instance. Doesclearstamps()
clear the stamps of all instances? Note that clearing a stamp removes it from the undo buffer.How does the undo buffer interact with
clearstamp()
? Once a stamp falls out of the undo buffer, can it still be cleared?