Fixed off-by-one error in rank calculation in Master Graded (#678)

This commit is contained in:
NOT_A_ROBOT
2022-03-31 12:58:04 +07:00
committed by GitHub
parent 73f63cfd0a
commit 5f539a2d4f

View File

@@ -20,15 +20,15 @@ return{
getRank=function(P)
local G=P.modeData.gradePts
return
G>=39 and 5 or -- TM+
G>=31 and 4 or -- MM- - TM
G>=25 and 3 or -- m8 - MO
G>=18 and 2 or -- m1 - m7
G>=9 and 1 or -- S1 - S9
G>=40 and 5 or -- TM+
G>=32 and 4 or -- MM- - TM
G>=26 and 3 or -- m8 - MO
G>=19 and 2 or -- m1 - m7
G>=10 and 1 or -- S1 - S9
0
-- Table of grades vs values
-- 9 8 7 6 5 4 3 2 1 S1 S2 S3 S4 S5 S6 S7 S8 S9 m1 m2 m3 m4 m5 m6 m7 m8 m9 M MK MV MO MM- MM MM+ GM- GM GM+ TM- TM TM+
-- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
-- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
end,
}