";includetransp=0"
}).done(function(data, textstatus, xhr) {
var moves = data['moves'];
- var root_move = sort_moves_by_common(moves, data);
+ var root_move = sort_move_by_frequency(moves, data);
var your_move, your_index;
for (var i = 0; i < moves.length; ++i) {
your_index = i;
}
}
- moves.sort(function(a, b) { return b['num'] - a['num'] });
if (your_move) {
$("#yourfraction").text(format_fraction(your_move['fraction']));
var candidate_moves = [];
var moves = data['moves'];
- var root_move = sort_moves_by_common(moves, data);
+ var root_move = sort_move_by_frequency(moves, data);
var practice_minimum_move_fraction;
if (move_override > 20) {
// Add deried data and then sort moves to get the most common ones (in-place).
// Remove the root mode and return it. Currently usable for practice mode only!
-var sort_moves_by_common = function(moves, data)
+var sort_move_by_frequency = function(moves, data)
{
var total_num = find_total_games(moves);
var root_move;
$("#stats").hide();
$("#practiceoutput").show();
document.getElementById("includetransp").checked = false;
+ set_includetransp(false);
} else {
$("#stats").show();
$("#practiceoutput").hide();