add_cell(header, 'th', 'Ds');
add_cell(header, 'th', 'Throwaways');
add_cell(header, 'th', 'Drops');
+ add_cell(header, 'th', 'Touches');
rows.push(header);
}
let defenses = 0;
let throwaways = 0;
let drops = 0;
+ let touches = 0;
for (const [q,p] of Object.entries(players)) {
if (q === 'globals') continue;
let row = document.createElement('tr');
add_cell(row, 'td', p.defenses == 0 ? 0 : (p.defenses / p.points_played).toFixed(2));
add_cell(row, 'td', p.throwaways == 0 ? 0 : (p.throwaways / p.points_played).toFixed(2));
add_cell(row, 'td', p.drops == 0 ? 0 : (p.drops / p.points_played).toFixed(2));
+ add_cell(row, 'td', p.touches == 0 ? 0 : (p.touches / p.points_played).toFixed(2));
} else {
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
+ add_cell(row, 'td', 'N/A');
}
rows.push(row);
defenses += p.defenses;
throwaways += p.throwaways;
drops += p.drops;
+ touches += p.touches;
}
// Globals.
add_cell(row, 'td', defenses == 0 ? 0 : (defenses / globals.points_played).toFixed(2));
add_cell(row, 'td', throwaways == 0 ? 0 : (throwaways / globals.points_played).toFixed(2));
add_cell(row, 'td', drops == 0 ? 0 : (drops / globals.points_played).toFixed(2));
+ add_cell(row, 'td', touches == 0 ? 0 : (touches / globals.points_played).toFixed(2));
} else {
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
add_cell(row, 'td', 'N/A');
+ add_cell(row, 'td', 'N/A');
}
rows.push(row);