I understand how your function works and it looks fine to me. (You probably could have saved some typing with for loops). I don't understand what you mean when you say "it looks".
If it reaches line 101 it will return 1 so the other returns are redundant.
Maybe post the loop? I don't see any reason for it in the function you posted.
'1', '2' are chars. Though in the parameter you say Board[][] is an array of ints. So that doesn't make sense to me. Maybe someone else knows.
As for chars
1 2 3 4 5 6 7 8 9 10
#include <iostream>
usingnamespace std;
int main()
{
char letter;
letter = 'H'; // is different that letter = H (as in a variable)
cout << letter << endl;
return 0;
}
This difference is x==1 and x==2 compare to see if x is equal to the numerical value 1 and the numerical value 2, where x=='1' and x=='2' compare to see if x is equal to the CHARACTER value 1 and 2. All digits have an ascii representation so they can be represented as characters. 1's Ascii representions is 49 decimal, and 2's is 50 decimal. Since board is a matrix of integers the following code fragments
Board[x][x]=='1'
Board[x][x]=='2'
will really turn out to be
Board[x][x]==49
Board[x][x]==50
in effect as the compiler will perform an implicit type case to the right type. So if this causes your code to work, then perhaps Board should be a matrix of characters, not integers