From 09a335457afb3006129099ffc0fa8fd1f8b0a834 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 20 Mar 2016 23:09:14 +0100 Subject: [PATCH 1/1] Fix score sorting (sigh). --- www/js/remoteglot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 5f3223d..bba9ad5 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1793,9 +1793,10 @@ var get_best_move = function(game, source, target) { } var first_move = line['pv_pretty'][0]; if (move_hash[first_move]) { - if (best_move_score === null || line['score_sort_key'] > best_move_score) { + var score = parseInt(line['score_sort_key'], 10); + if (best_move_score === null || score > best_move_score) { best_move = move_hash[first_move]; - best_move_score = line['score_sort_key']; + best_move_score = score; } } } -- 2.39.2