First of all i would like to apologize for being too vague in my prior requests for help regarding a randomly generated game board. I will try to be as precise as possible. Even then I am sorry if my question still ends up sounding vague because I have just started C and am not exactly sure how to explain myself better. So here goes,
1.) I assigned the values to elements as follows: Ry=0/Rr=1/Cy=2/Cr=3
2.) I then used time.h and the srand function along with two for loops to randomly fill an array with values from 0-3 and used if statements to print out the board as shown below.
the result is something like this:
1 Ry Rr Cy
2 Cy Rr Ry
3 Rr Cr Rr
In this game the objective is to get to all position of the board. A user may move from one element of the array ARRAY to ARRAY because the shape component (R) of the array is the same. The user may also move from ARRAY to ARRAY since the colour component (y) is the same. However since the board is randomly generated, there might not be a solution to the board(all possible paths that could lead the user to getting from one place on the board to every place.
I am having a very hard time finding a way to check if there is a solution to the board. Someone even suggested that I use 8 'for' loops and i just don't know how that is possible. This is all I myself know about this game and I have been trying to logically put things into place. So I have four questions and I will try to be as clear as possible.
1.) As i move from one position of the element to the other, is there a way to display an asterisk on the board to indicate my current position?
2.) How should I try to check if there is a solution to the board? Below is a link to the actual game:
This should be even more helpful then my words to help get a picture of the actual game.
Sorry for the long read. I have had three questions closed already and i have tried to learn from my mistakes. I know this isn't exactly easy to do for the helpers out there but I would appreciate any kind of help as I have no other options to look for help.