@ -70,7 +70,7 @@ public class ChessFigure {
return true;
break;
case QUEEN:
if ((dx == dy) || (dx == 0 ^ dy == 0))
if ((Math.abs(dx) == Math.abs(dy)) || (dx == 0 ^ dy == 0))
case CASTLE:
@ -68,7 +68,7 @@ class ChessFigureTest {
}
if ((x == y) || (x == 0 ^ y == 0)) {
if (Math.abs(x) == Math.abs(y) || (x == 0 ^ y == 0)) {
assertTrue(figure.isRelativeMoveValid(x, y));
continue;