Hello
im trying to make a c++ program and If for example i have aarray/grids that prints this out a startgrid and a goal grid like this
startgrid
1 2 3
4 5 6
7 8 X
goalgrid
2 1 3
7 5 6
4 8 X
During the program you are supposed to move X around to make the startgrid become exactly the same as the goalgrid, and here comes my question.
How can i make the program check the array/grid after each move of X to se if the startgrid is the same as the goalgrid and then halt the game if they are the same or continue the game like normal if they are still different?



LinkBack URL
About LinkBacks




i just started c++ not long ago and im getting lost in my own coding :/