areCellsInSameRow
Checks if two cells are in the same row based on their indices.
Throws an IllegalArgumentException with a specific message if either cell index is invalid.
Checks if two cells are in the same row based on their indices.
Throws an IllegalArgumentException with a specific message if either cell index is invalid.