Riichi.Actor (riichi v0.2.0)

Copy Markdown View Source

Summary

Types

t()

@type t() :: :actor1 | :actor2 | :actor3 | :actor4

Functions

actor_of_initial_seat(seat)

@spec actor_of_initial_seat(non_neg_integer()) :: t()

all()

@spec all() :: [t()]

all(rules)

@spec all(Riichi.Rules.t()) :: [t()]

all_after(actor)

@spec all_after(t()) :: [t()]

for_each(rules, fun)

@spec for_each(Riichi.Rules.t(), (t() -> k)) :: %{required(t()) => k} when k: var

initial_seat_of_actor(actor)

@spec initial_seat_of_actor(t()) :: 1..3

next(actor, rules)

@spec next(t(), Riichi.Rules.t()) :: t()