basic admin endgame view and add

This commit is contained in:
2026-06-22 20:43:09 +02:00
parent e955e40930
commit 006a2ca1c5
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