chessops icon indicating copy to clipboard operation
chessops copied to clipboard

Add `plyToTurn` util function

Open kraktus opened this issue 1 year ago • 2 comments

It's defined in three different places in lila.

kraktus avatar Nov 26 '24 18:11 kraktus

Looks a bit strange to me. Generally halfmove/ply is 0 based. And same in lila, for example on the analysis board:

{"treeParts":[{"ply":0,"fen":"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"}], ...}

But somehow in all these contexts lila uses 1-based ply? :thinking:

niklasf avatar Dec 08 '24 16:12 niklasf

It could be a historical mistake that has been copied over and over? I haven’t checked back but it seemed only used for user facing information

kraktus avatar Dec 19 '24 13:12 kraktus

Sorry, just noticed the PR is still hanging here. It seems to be working out fine in lila, but still a bit unusual method of counting.

niklasf avatar Sep 06 '25 17:09 niklasf