code wiki / _hdl_build / _an_score.nx
_an_score.nx source
↩ module page · 10 lines · 369 B
1// AUTHORED BY THE NISHI BUILDER (pattern: PERMIL_VERDICT) -- baked band ladder, no Claude logic
2func _an_score_verdict(count: i64) -> i64 {
3 if count < 0 { return 0 - 1 }
4 let permil: i64 = count * 1000 / 24
5 if permil >= 1000 { return 3 }
6 if permil >= 666 { return 2 }
7 if permil >= 333 { return 1 }
8 if permil >= 0 { return 0 }
9 return 0 - 1
10}