JPacman Undo feature, sample code