X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;fp=www%2Fjs%2Fremoteglot.js;h=6c220f43cac9dbb2462c12678f02f18304c64025;hp=594759157e5d1fa664fe146c824a56f6c5222c37;hb=deed21c21899c068017e4a9e149aaec592252447;hpb=ce0761dfe536522fb3570f145b0307d19869b893 diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 5947591..6c220f4 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -175,8 +175,6 @@ let display_fen = null; /** @typedef {{ * start_fen: string, * pv: Array., - * move_num: number, - * toplay: string, * scores: Array<{first_move: number, score: Object}>, * start_display_move_num: number * }} @@ -715,8 +713,6 @@ function add_pv(start_fen, pv, scores, start_display_move_num, opt_limit, opt_sh display_lines.push({ start_fen: start_fen, pv: pv, - move_num: find_move_num(start_fen), - toplay: find_toplay(start_fen), scores: scores, start_display_move_num: start_display_move_num }); @@ -740,8 +736,8 @@ function add_pv(start_fen, pv, scores, start_display_move_num, opt_limit, opt_sh function print_pv(line_num, splicepos, opt_limit, opt_showlast) { let display_line = display_lines[line_num]; let pv = display_line.pv; - let move_num = display_line.move_num; - let toplay = display_line.toplay; + let move_num = find_move_num(display_line.start_fen); + let toplay = find_toplay(display_line.start_fen); // Truncate PV at the start if needed. let start_display_move_num = display_line.start_display_move_num;