Packages

Is a random word generator dictionary used to create hangman game

Current section

Files

Jump to
dictionary_johnson lib runtime server.ex
Raw

lib/runtime/server.ex

defmodule Dictionary.Runtime.Server do
alias Dictionary.Impl.Words
@agent_name __MODULE__
use Agent
def start_link(_) do
Agent.start_link(&Words.word_list/0, name: @agent_name)
end
def get_random() do
Agent.get(@agent_name, &Words.generate_random/1)
end
end