Closed mcognetta closed 2 years ago
On this note, it seems like fromPosition
doesn't fit well into this enum, as it doesn't tell you what the game type is. Perhaps it can moved out to a boolean? I don't think it can be removed entirely (like implicitly defined by the presence of a non-starting board initial position FEN), since maybe the Chess960 response will include such a FEN.
Good catch. By (unfortunate) design, custom starting positions in standard chess are a variant called fromPosition
, and so variants do not support custom starting positions.
The game variant enum,
VariantKey
(definition), has an undocumented valuefromPosition
. For example, exporting this game, which was started from specific FEN, returns a JSON with"variant": "fromPosition"
.This enum value is not mentioned in the Lichess API docs: https://lichess.org/api#operation/gamePgn.