getFirstDifferent(init, color, dx, dy) {
			let x = init.getX() + dx;
			let y = init.getY() + dy;
			while (this.isValid(x, y) && this.image.get(x, y) === color) {
				x += dx;
				y += dy;
			}
			x -= dx;
			y -= dy;
			while (this.isValid(x, y) && this.image.get(x, y) === color) {
				x += dx;
			}
			x -= dx;
			while (this.isValid(x, y) && this.image.get(x, y) === color) {
				y += dy;
			}
			y -= dy;
			return new Point(x, y);
		}
Gets the coordinate of the first point with a different color in the given direction