View Source Buzzword.Bingo.Engine (Buzzword Bingo Engine v0.1.27)

Models the Multi-Player Buzzword Bingo game.

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

Link to this section 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.

Link to this section Functions

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

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

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

Returns a sorted list of registered game names.

@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.

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

Returns the summary of a game.

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

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

Link to this function

mark_square(game_name, phrase, player)

View Source

Marks a square with a player.

Link to this function

new_game(game_name, size)

View Source

Starts a new game server process and supervises it.