Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. /*
  2. * Helper class to avoid hardcoding the difficulty names in the HungarianBook class,
  3. * but store them in the list for faster accessing an easier modifying
  4. */
  5. public class DifficultyUtils {
  6.  
  7.     // Create a static single line list with 3 names of difficulties
  8.     // according to the difficulty range 1-3
  9.     public static List<String> difficultyNames = Arrays.asList("Basic", "Intermediate", "Hard");
  10.  
  11.    
  12.     /*
  13.     * Method to
  14.     */
  15.     public static String getDifficultyLevel(int difficultyLevel){
  16.         return difficultyNames.get(difficultyLevel-1);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement