This is for my class in college. I've already turned this in late and will get points off for not having this program done correctly; but this week we are expanding on this puzzle. I'm in need of help on one section that I was unable to figure out on my own. I spent a few hours trying to find a way to do this; but unfortunately, I was just stumped. Hopefully, I can get some help from here. Could someone help me on figuring out how to store the moves made done by the user and print them out once the puzzle is solved.
For each move the user makes you must record the board state in a data structure. Again the choice of data structure is up to you as long as you ensure efficient storage. Make sure that you can remove the board states in the order they were put into the structure (a queue, vector or list is best here).
If and when the user successfully navigates the board to the solution state, the program must output:
• “YOU WIN!!” or something along these lines. (Please remember to include adequate excitement, users like this!)
• The number of moves it took the user to solve the puzzle
• The list of the board states the user went through to solve the puzzle (pause the output – ‘hit enter to continue’ before displaying this).