:eek: This is the strangest thing. The program ignores all of my for loops in this method. I double checked the syntax and everything. Am I missing something?
BTW, I know that it skips those, because I tell it to play a sound when it enters, and it doesn't play the sound...HOWEVER, if i put the play sound statement outside of the loop (directly after the method is declared), it plays it...wat is going on?:sad:
public bool MoveValid(int col, int row, int val)
{
for (int r = 1; r == 9; r++)
{
splayer.Play();
if (actual[col, r]==val)
{
return false;
}
}
for (int c = 1; c == 9; c++)
{
if (actual[c, row] == val)
{ return false;}
}
int StartC, StartR;
StartC= col -((col-1)% 3);
StartR = row - ((row - 1) % 3);
for (int rr = 0; rr == 2; rr++)
{
for (int cc = 0; cc == 2; cc++)
{
if (actual[StartC + cc, StartR + rr] == val)
{
return false;
}
}
}
return true;
}