yatzy v1.0.0 Yatzy View Source
Documentation for Yatzy.
Link to this section Summary
Functions
Ending a game
Starting a game
(Re)Rolling the dices for a given player
Scoring the current roll for a player
Link to this section Types
Link to this section Functions
Link to this function
end_game(game_state)
View Sourceend_game(game_state :: Yatzy.Game.t()) :: Yatzy.Game.t()
Ending a game
Link to this function
new_game(players)
View Sourcenew_game([String.t()]) :: {:ok, Yatzy.Game.t()} | {:error, String.t()}
Starting a game
Link to this function
roll(game_state, player, opts \\ [])
View Sourceroll( game_state :: Yatzy.Game.t(), player :: String.t(), roll_options :: roll_options() ) :: Yatzy.Game.t()
(Re)Rolling the dices for a given player
Link to this function
save(game_state, player, rule)
View Sourcesave(game_state :: Yatzy.Game.t(), player :: String.t(), rule :: atom()) :: Yatzy.Game.t()
Scoring the current roll for a player