diff --git a/apps/web/src/arcade-games/rithmomachia/components/board/BoardDisplay.tsx b/apps/web/src/arcade-games/rithmomachia/components/board/BoardDisplay.tsx index d76dbb79..05618fec 100644 --- a/apps/web/src/arcade-games/rithmomachia/components/board/BoardDisplay.tsx +++ b/apps/web/src/arcade-games/rithmomachia/components/board/BoardDisplay.tsx @@ -10,6 +10,7 @@ import { usePieceSelection } from '../../hooks/usePieceSelection' import { useRithmomachia } from '../../Provider' import type { Piece, RelationKind } from '../../types' import { getSquarePosition } from '../../utils/boardCoordinates' +import { validateMove } from '../../utils/pathValidator' import { getEffectiveValue } from '../../utils/pieceSetup' import { checkDiff, @@ -454,6 +455,10 @@ export function BoardDisplay() { if (!moverPiece || !targetPiece) return false + // First check if the move path is valid + const validation = validateMove(moverPiece, selectedSquare, hoveredSquare, state.pieces) + if (!validation.valid) return false + const moverValue = getEffectiveValue(moverPiece) const targetValue = getEffectiveValue(targetPiece)