hedwig_trivia v0.1.0 HedwigTrivia View Source

A GenServer to hold the state and provide a general API to the game.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Check the user's guess against the right answer.

Fetch a random question.

Return the actual answer to the question. For use when the user has given up.

Debug the current game state.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Check the user's guess against the right answer.

Link to this function

question(new \\ false)

View Source
question(boolean()) :: {atom(), String.t()}

Fetch a random question.

Link to this function

solution()

View Source
solution() :: {atom(), String.t()}

Return the actual answer to the question. For use when the user has given up.

Debug the current game state.