fix sleeve university job (#604)

This commit is contained in:
Aleksei Bezrodnov 2023-06-12 21:19:35 +02:00 committed by GitHub
parent 70eda40bb6
commit 61c8026bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -214,23 +214,25 @@ export class Sleeve extends Person implements SleevePerson {
// Set experience/money gains based on class // Set experience/money gains based on class
let classType: ClassType | undefined; let classType: ClassType | undefined;
// TODO: why lower case??? It's not effecient, not typesafe and in general a bad idea
switch (className.toLowerCase()) { switch (className.toLowerCase()) {
case "study computer science": case "study computer science": // deprecated, leave it here for backwards compatibility
case ClassType.computerScience.toLowerCase():
classType = UniversityClassType.computerScience; classType = UniversityClassType.computerScience;
break; break;
case "data structures": case ClassType.dataStructures.toLowerCase():
classType = UniversityClassType.dataStructures; classType = UniversityClassType.dataStructures;
break; break;
case "networks": case ClassType.networks.toLowerCase():
classType = UniversityClassType.networks; classType = UniversityClassType.networks;
break; break;
case "algorithms": case ClassType.algorithms.toLowerCase():
classType = UniversityClassType.algorithms; classType = UniversityClassType.algorithms;
break; break;
case "management": case ClassType.management.toLowerCase():
classType = UniversityClassType.management; classType = UniversityClassType.management;
break; break;
case "leadership": case ClassType.leadership.toLowerCase():
classType = UniversityClassType.leadership; classType = UniversityClassType.leadership;
break; break;
} }