Wordlex
Core game logic for a Wordle-inspired word guessing game, written in Elixir.
Wordlex provides the building blocks to run a daily word game:
- Word selection â picks the word of the day from a list, either randomly or by a deterministic index (e.g. based on the current date)
- Guess feedback â compares a player's guess against the target word and returns letter-by-letter feedback:
:ok(correct position),:exists(wrong position), or:miss(not in word) - String normalization â accent-insensitive and case-insensitive comparisons, so
ĂȘmatcheseandAmatchesa
Installation
If available in Hex, the package can be installed
by adding wordlex to your list of dependencies in mix.exs:
def deps do
[
{:wordlex, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/wordlex.