java.lang.Object
com.slinky.hackmaster.model.text.WordBank
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 Summary
Modifier and TypeMethodDescriptionstatic WordSet
getWordSet
(Difficulty difficulty) Returns the word list for the specified difficulty level.
-
Method Details
-
getWordSet
Returns the word list for the specified difficulty level.This method retrieves the corresponding
StaticWordSet
for the givenDifficulty
level. If an unknown difficulty level is provided, anError
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.
-