Question: Create a function called initializeArrays that takes each array in as an input argu- ment. The function should initialize the bool array revealed to be

Create a function called initializeArrays that takes each array in as an input argu- ment. The function should initialize the bool array revealed to be false. The board array should be initialized as follows: First, initialize the entire array to -1 Then, for each integer i from 0 to 7: Find two random spaces that are both -1 in board and set them to i Hint: To select a random space should use the rand function. You will need to use #include to use rand. To select a random row, you simply use rand as follows: row = rand() % ROWS Hint: You will want to use a loop to continually select a random row and column until you find a location that is -1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!