mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
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.
25 lines
673 B
Elixir
25 lines
673 B
Elixir
defmodule Chesstrainer.Endgames.Tablebase.Move do
|
|
@moduledoc """
|
|
Moves struct for the tablebase
|
|
|
|
Carries only the fields the trainer reads: `category` and `dtz` for grading,
|
|
and `san`/`uci` for display and matching. Terminal detection is structural
|
|
(the next position's `checkmate` or its empty `moves`), so no per-move
|
|
terminal flags are kept.
|
|
"""
|
|
|
|
@type result :: :win | :draw | :loss | :unknown
|
|
|
|
@type t :: %__MODULE__{
|
|
category: result,
|
|
dtz: integer() | nil,
|
|
san: String.t() | nil,
|
|
uci: String.t() | nil
|
|
}
|
|
|
|
defstruct category: nil,
|
|
dtz: nil,
|
|
san: nil,
|
|
uci: nil
|
|
end
|