(currentPattern?: number)
| 17 | } |
| 18 | |
| 19 | export const getRandomAlgorithm = (currentPattern?: number): number => { |
| 20 | const availableAlgorithms = algorithms.filter(a => a.id !== currentPattern); |
| 21 | const randomIndex = Math.floor(Math.random() * availableAlgorithms.length); |
| 22 | return availableAlgorithms[randomIndex].id; |
| 23 | }; |
| 24 | |
| 25 | const AlgorithmSelect: React.FC<AlgorithmSelectProps> = ({ |
| 26 | pattern, |
nothing calls this directly
no outgoing calls
no test coverage detected