(range, avoid)
| 15 | |
| 16 | // utils |
| 17 | function noRepeat(range, avoid) { |
| 18 | var number = Math.random() * range | 0; |
| 19 | for (var i in avoid) { |
| 20 | if (number == avoid[i]) { |
| 21 | return noRepeat(range, avoid); |
| 22 | } |
| 23 | } |
| 24 | return number; |
| 25 | } |
| 26 | |
| 27 | function equal(prediction, output) { |
| 28 | for (var i in prediction) |
no outgoing calls
no test coverage detected