E.W.O. Next / All files / src/engine/models/Character Genre.ts

50% Statements 5/10
22.22% Branches 2/9
50% Functions 1/2
50% Lines 5/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20          11x 11x 11x 11x     11x                
/**
 * @module Engine.Models.Character
 * Genre
 */
 
export enum Genre {
  Female,
  Male,
  Other,
}
 
export const GenreFromString = (genre: string | number): Genre => {
  switch (genre) {
    case '0': case 0: return Genre.Female;
    case '1': case 1: return Genre.Male;
    case '2': case 2: return Genre.Other;
    default: return Genre.Other;
  }
};