Current section

Files

Jump to
gchess src color.erl
Raw

src/color.erl

-module(color).
-compile([no_auto_import, nowarn_unused_vars]).
-export([to_string/1]).
-export_type([color/0]).
-type color() :: white | black.
-spec to_string(color()) -> binary().
to_string(Color) ->
case Color of
white ->
<<"White"/utf8>>;
black ->
<<"Black"/utf8>>
end.