Checks if the coordinate is valid for the given board size.
True if the coordinate is within the bounds of the board.
The size of the board (number of rows/columns).