Added validTargetCell that takes x0, y0, x1, y1