Converted getRow and getCol methods to colContains and rowContains, and added gridContains method.