Skip to content

Commit

Permalink
fix: sorting direction in exp-compare
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsunee committed Sep 23, 2024
1 parent 68fe1f5 commit 8dcce63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exp-compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async function main() {
lang: monster.lang
}));

if (isSorted) results.sort((a, b) => a.exp.expPerHp - b.exp.expPerHp);
if (isSorted) results.sort((a, b) => b.exp.expPerHp - a.exp.expPerHp);
const bestVal = Math.max(...results.map(res => res.exp.expPerHp));
const table = Object.fromEntries(
results.map(result => {
Expand Down

0 comments on commit 8dcce63

Please sign in to comment.