java.lang.Object
com.slinky.hackmaster.model.text.WordBank

public final class WordBank extends Object
The WordBank class provides a repository of word lists categorised by difficulty levels.

It offers word lists for five difficulty levels: BEGINNER, INTERMEDIATE, ADVANCED, EXPERT, and MASTER. Each word list is shuffled upon initialisation to ensure random order. The class also provides a method to retrieve the word list for a specific difficulty level.

Example usage:

 StaticWordSet beginnerList = WordBank.getWordSet(Difficulty.BEGINNER);
 

Author:
Kheagen Haskins
See Also:
  • Method Details

    • getWordSet

      public static WordSet getWordSet(Difficulty difficulty)
      Returns the word list for the specified difficulty level.

      This method retrieves the corresponding StaticWordSet for the given Difficulty level. If an unknown difficulty level is provided, an Error is thrown.

      Parameters:
      difficulty - the difficulty level for which the word list is to be retrieved.
      Returns:
      the StaticWordSet corresponding to the specified difficulty level.
      Throws:
      Error - if the provided difficulty level is unknown.