From deed21c21899c068017e4a9e149aaec592252447 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 27 Dec 2023 10:51:41 +0100 Subject: [PATCH] Remove a small redundancy in DisplayLine. --- www/js/remoteglot.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; -- 2.39.2