Implemented adjacentToPixel function in Pixel class.