INNER CODE UNIT · TypeScript
isOngoingGame
gbtami/pychess-variants · client/analysis/index.ts:260
const isOngoingGame = model.status == -1;
let ctrl: AnalysisController | undefined;
renderTimeago();
const addToStudy = async () => {
const tree = ctrl?.analysisTree;
if (!ctrl || !tree) return;
try {
const defaultChapterName =
model.gameId && model.wplayer && model.bplayer ? `${model.wplayer} - ${model.bplayer}` : _('Analysis');
const destination = await chooseStudy(defaultChapterName);
if (!destination) return;
const tags = studyTagsFromAnalysis(model, ctrl);
const response = await fetch('/study/from-analysis', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
variant: model.variant || 'chess',