There is an
A white rook at coordinates (a, b)
A white bishop at coordinates (c, d)
A black queen at coordinates (e, f)
In each move, you may move either the white rook or the white bishop according to standard chess rules:
The rook can move any number of squares horizontally or vertically, but cannot jump over any piece.
The bishop can move any number of squares diagonally, but cannot jump over any piece.
The black queen does not move.
Return the minimum number of moves required for either the white rook or the white bishop to capture the black queen.
Constraints:
a, b, c, d, e, f
No two pieces are on the same square.
There is an
A white rook at coordinates (a, b)
A white bishop at coordinates (c, d)
A black queen at coordinates (e, f)
In each move, you may move either the white rook or the white bishop according to standard chess rules:
The rook can move any number of squares horizontally or vertically, but cannot jump over any piece.
The bishop can move any number of squares diagonally, but cannot jump over any piece.
The black queen does not move.
Return the minimum number of moves required for either the white rook or the white bishop to capture the black queen.
Constraints:
a, b, c, d, e, f
No two pieces are on the same square.