Packt_CreatingGamesWithAI/TictacToeGame/TicTacToeBoard.cpp
bool TicTacToeBoard::isMovesLeft()
{
    for (int row = 0; row < mRowCount; row++)
    {
        for (int col = 0; col < mColCount; col++)
        {
            if (mGameField[row][col] == eFIELD_MOVES::eFM_EMPTY)
            {
                return true;
            }
        }
    }
    
    return false;
}
// Checks whether there is space left on the game board
// RETURN TRUE: There is space to play more
// RETURN FALSE: No space left on the board
Checks whether there is space left on the game board
RETURN TRUE: There is space to play more
RETURN FALSE: No space left on the board
Checks whether there is space left on the game board RETURN TRUE : There is space to play more RETURN FALSE : No space left on the board
bool TicTacToeBoard::isMovesLeft()
{
    for (int row = 0; row < mRowCount; row++)
    {
        for (int col = 0; col < mColCount; col++)
        {
            if (mGameField[row][col] == eFIELD_MOVES::eFM_EMPTY)
            {
                return true;
            }
        }
    }
    return false;
}
bool TicTacToeBoard :: isMovesLeft ( ) { for ( int row = 0 ; row < mRowCount ; row ++ ) { for ( int col = 0 ; col < mColCount ; col ++ ) { if ( mGameField [ row ] [ col ] == eFIELD_MOVES :: eFM_EMPTY ) { return true ; } } } return false ; }
Checks whether there is space left on the game board
RETURN TRUE: There is space to play more
RETURN FALSE: No space left on the board
Checks whether there is space left on the game board RETURN TRUE : There is space to play more RETURN FALSE : No space left on the board