basic admin endgame view and add (#3)

Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
2026-06-22 18:44:52 +00:00
parent e955e40930
commit b47fcdffcb
82 changed files with 2031 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
defmodule Chesstrainer.FEN do
@spec color_from_fen(String.t()) :: :white | :black | nil
def color_from_fen(fen) do
fen
|> String.split(" ")
|> Enum.at(1)
|> color_initial_to_color_atom()
end
defp color_initial_to_color_atom("b"), do: :black
defp color_initial_to_color_atom("w"), do: :white
defp color_initial_to_color_atom(_), do: nil
end