Hello all!
I am creating a free cell game for a java class, and I am having a little bit of trouble implementing a feature to the game. The feature is an undo feature and I am not sure if I have the logic correct on account of having no success with the code.
What I was thinking of doing is making a copy of the object with the game data and adding it to a stack every time the user makes a move in the game. if the undo feature is called, this current object would be set to what ever is popped off the top of the stack. However I am not sure if this is the correct way to do this, or why I am not having any success implementing it.
The following is the code where the copy is generated and stored in the stack
bakersGame - Pastebin.com Case 'F' is what I am dealing with. This is the corresponding class of which it is dependent on. bakersGame - Pastebin.com
any idea or input would be greatly appreciated thank you !!