View Source Hangman.Text.Client.State (Hangman Game v0.1.55)

Creates a state struct for the Hangman Game.

The state struct contains the fields game_name, tally and guess representing the characteristics of a state in the Hangman Game.

Link to this section Summary

Types

t()

A state struct for the Hangman Game

Functions

Creates a state struct from a game_name.

Link to this section Types

Specs

t() :: %Hangman.Text.Client.State{
  game_name: Hangman.Game.name(),
  guess: Hangman.Game.letter() | nil,
  tally: Hangman.Game.tally()
}

A state struct for the Hangman Game

Link to this section Functions

Specs

new(Hangman.Game.name()) :: t()

Creates a state struct from a game_name.