Buzzword.Bingo.Engine (Buzzword Bingo Engine v0.1.36)

View Source

Models the Multi-Player Buzzword Bingo game.

Based on the course Multi-Player Bingo by Mike and Nicole Clark.

Summary

Functions

Stops a game server process normally. It won't be restarted.

Returns a sorted list of registered game names.

Returns the pid of the game server process registered via the given game_name, or nil if no such process is registered.

Returns the summary of a game.

Generates a unique, URL-friendly name such as "bold-frog-8249".

Marks a square with a player.

Starts a new game server process and supervises it.

Prints the summary of a game as a formatted table.

Functions

end_game(game_name)

@spec end_game(Buzzword.Bingo.Game.name()) :: :ok | {:error, term()}

Stops a game server process normally. It won't be restarted.

game_names()

@spec game_names() :: [Buzzword.Bingo.Game.name() | atom()]

Returns a sorted list of registered game names.

game_pid(game_name)

@spec game_pid(Buzzword.Bingo.Game.name()) :: pid() | nil

Returns the pid of the game server process registered via the given game_name, or nil if no such process is registered.

game_summary(game_name)

@spec game_summary(Buzzword.Bingo.Game.name()) ::
  Buzzword.Bingo.Summary.t() | {:error, term()}

Returns the summary of a game.

haiku_name()

@spec haiku_name() :: Buzzword.Bingo.Game.name()

Generates a unique, URL-friendly name such as "bold-frog-8249".

mark_square(game_name, phrase, player)

Marks a square with a player.

new_game(game_name, size)

Starts a new game server process and supervises it.