ExPilot.Mode (ExPilot v0.1.1)

Copy Markdown View Source

The kinds of arena ExPilot.Game.mode/1 tells apart, in words and in colour, for every client's lobby.

ExPilot.Mode.name(:ctf)
ExPilot.Mode.colour(:ctf)
ExPilot.Mode.kind(:ctf)

Summary

Functions

The kind's colour.

The kind as a lobby lists it: {name, colour}.

The kind in words.

The mode a lobby's kind stands for; :dogfight for a kind that is none of them.

Functions

colour(mode)

@spec colour(atom() | String.t()) :: {byte(), byte(), byte()}

The kind's colour.

kind(mode)

@spec kind(atom() | String.t()) :: {String.t(), {byte(), byte(), byte()}}

The kind as a lobby lists it: {name, colour}.

name(mode)

@spec name(atom() | String.t()) :: String.t()

The kind in words.

of_kind(arg1)

@spec of_kind({String.t(), tuple()} | nil) :: atom()

The mode a lobby's kind stands for; :dogfight for a kind that is none of them.