Hangman.Engine.new_game
You're seeing just the function
new_game
, go back to Hangman.Engine module for more information.
Link to this function
new_game(game_name)
Specs
new_game(Hangman.Game.name()) :: Supervisor.on_start_child()
Starts a new game server process and supervises it.
Examples
iex> alias Hangman.Engine
iex> {:ok, game_id} = Engine.new_game("Meg")
iex> {:error, {:already_started, ^game_id}} = Engine.new_game("Meg")
iex> is_pid(game_id)
true