You could build a type list. Each time something moves, post it's old co-ords into it, with a flag stating either insert or remove occupied status.
The program will search through this type list afterwards and make the nesessary changes.
Something like that?
Then, when it comes to process it:
The program will search through this type list afterwards and make the nesessary changes.
Type postbox field x,y field flag ; 0 for remove occupied status. 1 for mark as occupied. End Type
p.postbox = new postbox p\x = arrayx p\y = arrayy p\flag = 0
Something like that?
Then, when it comes to process it:
For p.postbox = each postbox if p\flag = 0 then array(p\x,p\y) = <mark as empty> elseif p\flag = 1 then array(p\x,p\y) = <mark as occupied> end if delete p.postbox Next