Simplify the Tablebase struct to the fields the grader reads (#26)

Drop dtm/dtc from Tablebase and Tablebase.Move; the local Syzygy backend cannot produce them and nothing reads them. The Lichess parser now maps only category, checkmate and moves (with per-move category, dtz, san and uci), and the struct-shape tests follow.
This commit is contained in:
2026-11-03 12:41:28 +01:00
parent ff7adcf308
commit ec657c3424
4 changed files with 12 additions and 24 deletions
@@ -43,8 +43,6 @@ defmodule Chesstrainer.Endgames.Tablebase.Parser do
%Tablebase{
category: Tablebase.normalize_category(map["category"]),
checkmate: map["checkmate"],
dtc: map["dtc"],
dtm: map["dtm"],
moves: Enum.map(map["moves"], &moves_from_map/1)
}}
end
@@ -52,8 +50,6 @@ defmodule Chesstrainer.Endgames.Tablebase.Parser do
defp moves_from_map(map) do
%Tablebase.Move{
category: Tablebase.normalize_category(map["category"]),
dtc: map["dtc"],
dtm: map["dtm"],
dtz: map["dtz"],
san: map["san"],
uci: map["uci"]