View Source Buzzword.Bingo.Player (Buzzword Bingo Player v0.1.10)
Creates a player struct for the Multi-Player Buzzword Bingo game.
The player struct contains the fields name
and color
representing the
characteristics of a player in the Multi-Player Buzzword Bingo game.
Based on the course Multi-Player Bingo by Mike and Nicole Clark.
Summary
Functions
Creates a player struct with the given name
and color
.
Types
Functions
Creates a player struct with the given name
and color
.
Examples
iex> alias Buzzword.Bingo.Player
iex> Player.new("Helen", "#f9cedf")
%Player{name: "Helen", color: "#f9cedf"}
iex> alias Buzzword.Bingo.Player
iex> Player.new("Jimmy", "deep_sky_blue")
%Player{name: "Jimmy", color: "deep_sky_blue"}
iex> alias Buzzword.Bingo.Player
iex> Player.new("Jane", :red)
{:error, :invalid_player_args}