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
let classType: ClassType | undefined;
// TODO: why lower case??? It's not effecient, not typesafe and in general a bad idea
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;
break;
case "data structures":
case ClassType.dataStructures.toLowerCase():
classType = UniversityClassType.dataStructures;
break;
case "networks":
case ClassType.networks.toLowerCase():
classType = UniversityClassType.networks;
break;
case "algorithms":
case ClassType.algorithms.toLowerCase():
classType = UniversityClassType.algorithms;
break;
case "management":
case ClassType.management.toLowerCase():
classType = UniversityClassType.management;
break;
case "leadership":
case ClassType.leadership.toLowerCase():
classType = UniversityClassType.leadership;
break;
}