Skip to content

Commit

Permalink
Update GR reward test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Nov 7, 2024
1 parent e7546ef commit a3b3d47
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions grand-races/rewards.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,28 @@ const REWARDS_MATRIX = {
8: [ 68, 60, 52, 52, 52, 52, 52, 52 ],
};

const REWARDS_PERC_TO_KEY = {
80: 81,
70: 76,
60: 72,
50: 68,
20: 56,
10: 52,
};

console.assert(REWARDS_MATRIX[24][8 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[25][12 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[26][7 - 1] == REWARDS_PERC_TO_KEY[60]);
console.assert(REWARDS_MATRIX[26][10 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[26][12 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[27][4 - 1] == REWARDS_PERC_TO_KEY[80]);
console.assert(REWARDS_MATRIX[27][6 - 1] == REWARDS_PERC_TO_KEY[60]);
console.assert(REWARDS_MATRIX[27][11 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[27][15 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[27][17 - 1] == REWARDS_PERC_TO_KEY[20]);
console.assert(REWARDS_MATRIX[28][7 - 1] == REWARDS_PERC_TO_KEY[60]);
console.assert(REWARDS_MATRIX[28][8 - 1] == REWARDS_PERC_TO_KEY[60]);
console.assert(REWARDS_MATRIX[28][10 - 1] == REWARDS_PERC_TO_KEY[60]);
console.assert(REWARDS_MATRIX[28][11 - 1] == REWARDS_PERC_TO_KEY[60]);
console.assert(REWARDS_MATRIX[28][13 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[28][15 - 1] == REWARDS_PERC_TO_KEY[50]);
console.assert(REWARDS_MATRIX[28][17 - 1] == REWARDS_PERC_TO_KEY[20]);
console.assert(REWARDS_MATRIX[18][7 - 1] == 56);
console.assert(REWARDS_MATRIX[21][11 - 1] == 56);
console.assert(REWARDS_MATRIX[24][8 - 1] == 68);
console.assert(REWARDS_MATRIX[25][5 - 1] == 72);
console.assert(REWARDS_MATRIX[25][12 - 1] == 68);
console.assert(REWARDS_MATRIX[26][7 - 1] == 72);
console.assert(REWARDS_MATRIX[26][8 - 1] == 68);
console.assert(REWARDS_MATRIX[26][10 - 1] == 68);
console.assert(REWARDS_MATRIX[26][12 - 1] == 68);
console.assert(REWARDS_MATRIX[27][4 - 1] == 81);
console.assert(REWARDS_MATRIX[27][6 - 1] == 72);
console.assert(REWARDS_MATRIX[27][11 - 1] == 68);
console.assert(REWARDS_MATRIX[27][15 - 1] == 68);
console.assert(REWARDS_MATRIX[27][17 - 1] == 56);
console.assert(REWARDS_MATRIX[28][5 - 1] == 81);
console.assert(REWARDS_MATRIX[28][7 - 1] == 72);
console.assert(REWARDS_MATRIX[28][8 - 1] == 72);
console.assert(REWARDS_MATRIX[28][10 - 1] == 72);
console.assert(REWARDS_MATRIX[28][11 - 1] == 72);
console.assert(REWARDS_MATRIX[28][13 - 1] == 68);
console.assert(REWARDS_MATRIX[28][15 - 1] == 68);
console.assert(REWARDS_MATRIX[28][17 - 1] == 56);

function renderRewards()
{
Expand Down

0 comments on commit a3b3d47

Please sign in to comment.