שאלה בC

שאלה בC

int i, max=0, newMax, imax, jmax, numOfMove=0; int movesArray[GRID_SIZE*GRID_SIZE][2]; numOfMove=possibleMoves(board,movesArray, player); if(hasMoves(board,player)==TRUE) { for(i=0; i<numOfMove;i++) { newMax=benefit(board,player,movesArray[0],movesArray[1]); if(newMax>max) { max=newMax; imax=movesArray[0]; jmax=movesArray[1]; } } } play(board, player, imax, jmax);

בתנאי ההתחלתי בדקתי אם יש צעדים בכלל לשחקן ואם יש זה נכנס לבפנים שאלתי היא אם אין צעדים אז הוא לא נכנס לבפנים ואז בעצם הוא לא ידע לשחק לפי הקורדינטות
play(board, player, imax, jmax);​
אם זה לא בסדר, איך אני משנה את זה לכך שאם אין לו צעדים לעשות אז שלא ישחק?
 
למעלה