getTile(row, column) returns the tile value at a position on the 3 x 3 board; the blank space is represented by 0.
| int ref1, ref2; |
| for (int i = 0; i < 3; i++) |
| { |
| for (int j = 0; j < 3; j++) |
| { |
| if (getTile(i, j) == 0) |
| { |
| ref1 = i; |
| ref2 = j; |
| } |
| } |
| } |
Explain the purpose of the second iteration structure in the program in Figure 16.
Your answer