I was wondering if it got harder or if it's just random:
function generateColors(difficulty, blacklist) {
...
let sample = Math.floor(Math.min(Math.max(0, 1-Math.pow(1-difficulty, 1.5)), .99)*5);
let distance = (5 - sample)/5;
...
}
function setupRound(blacklist) {
...
const data = generateColors(currentRound/totalRounds, blacklist);
...
}
Plotting that first magic: https://lucb1e.com/randomprojects/js/testformula.htm#%24%28%... round# difference
0-- 2 5
3-- 5 4
6-- 9 3
10--13 2
14--20 1
The "blacklist" parameter prevents that you get the same challenge twice. Note also that it submits every answer to the server (fine imo, but I think it would be even nicer if this was mentioned on the page) replies(2):