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 WordSetgetWordSet(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
StaticWordSetfor the givenDifficultylevel. If an unknown difficulty level is provided, anErroris thrown.- Parameters:
difficulty- the difficulty level for which the word list is to be retrieved.- Returns:
- the
StaticWordSetcorresponding to the specified difficulty level. - Throws:
Error- if the provided difficulty level is unknown.
-