C++ Programming - Ricochet Robots with undo