// Move hints — computes valid destination list for selected piece
export function showHints(validMoves, selectedPieceId) {
  if (!selectedPieceId) return [];
  return validMoves
    .filter(m => m.piece.id === selectedPieceId)
    .map(m => m.to === 'off' ? 'off' : m.to);
}

export function clearHints() {
  return [];
}

export function getMovablePieces(validMoves) {
  const pieces = new Set();
  for (const m of validMoves) {
    pieces.add(m.piece.id);
  }
  return [...pieces];
}
