This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/projects/common/src/utils/scoresaber-utils.ts
Liam b3c124631a
Some checks failed
Deploy Backend / deploy (push) Successful in 2m26s
Deploy Website / deploy (push) Failing after 1m52s
move score page fetching to the backend
2024-10-17 15:30:14 +01:00

30 lines
507 B
TypeScript

import { Difficulty } from "../score/difficulty";
/**
* Formats the ScoreSaber difficulty number
*
* @param diff the diffuiclity number
*/
export function getDifficultyFromScoreSaberDifficulty(diff: number): Difficulty {
switch (diff) {
case 1: {
return "Easy";
}
case 3: {
return "Normal";
}
case 5: {
return "Hard";
}
case 7: {
return "Expert";
}
case 9: {
return "Expert+";
}
default: {
return "Unknown";
}
}
}