clordle library

Classes

ClordleCommandRunner
Entry point to the clordle cli game.
GameState
The state of a given game.
Letter
The game's representation of a letter.
PlayCommand
Entry point to the play sub-command.
Word
The game's representation of a word.

Enums

GameStatus
Represents the state/status of a given game.
LetterStatus
The state or status of any given letter in the game.

Constants

words → const List<String>
The list of all the possible game words.

Functions

close(String value) String
Style the given value.
gameboard(Iterable<Word> words) Iterable<String>
Generates the game board with a given list of words. Generally use this with .join('\n') to create a human-readable board:
gameboardRow(Word word, String close(String), String hit(String)) Iterable<String>
Generates a row of the gameboard with the given word. Generally use this with .join() to create a single string row:
gameShouldContinue(GameState game, String guesser(String)) bool
Evaluates the given game and determines if the game has not ended.
getWord(List<String> words, int selector(int)) String
Select the word from words using the selector.
hit(String value) String
Style the given value.
keyboard({Iterable<Letter> playedLetters = const []}) Iterable<String>
Generates the keyboard. Generally use this with .join('\n') to create a human-readable board:
keyboardRow(Iterable<String> letters, String close(String), String hit(String), String miss(String), {Iterable<Letter> hits = const <Letter>[], Iterable<Letter> misses = const <Letter>[], Iterable<Letter> closes = const <Letter>[]}) Iterable<String>
Generates a single row for keyboard.
miss(String value) String
Style the given value.
remainingGuessesLabel(int value) String
Creates the grammatically correct human-readable string for the number of remaining guesses.