`);
+ let resultsCardBody = $("#results").find("div.card-body");
+ resultsCardBody.append(`
Asphodice Results
`);
+ resultsCardBody.append(`
Rerolls
`);
+ resultsCardBody.append(`
+
Rerolled: ${rollstats.rerollCounts.true} (${(rollstats.rerollCounts.true / rollstats.numRolls * 100).toFixed(2)} %)
+
Not rerolled: ${rollstats.rerollCounts.false} (${(rollstats.rerollCounts.false / rollstats.numRolls * 100).toFixed(2)} %)
+
`);
+
+ resultsCardBody.append(`
Outcome Balances
`);
+ resultsCardBody.append(`
`);
- //
+
+ resultsCardBody.append(`
Outcomes
`);
+ resultsCardBody.append(`
`);
+
let bc = rollstats.balanceCounts;
let keys = Object.keys(bc);
keys.sort(function(a: string, b: string){return Number(a) - Number(b)});
- //for (let balance in rollstats.balanceCounts) {
for (var i = 0; i < keys.length; i++) {
let tb = $("#balanceTable").find("tbody");
tb.append(`
${keys[i]} |
@@ -29,8 +40,19 @@ function getResults():void {
${(rollstats.balanceCounts[keys[i]] / rollstats.numRolls * 100).toFixed(2)} |
`);
}
- $("#results").append(`
`);
- $("#results").append(``);
+
+ let oc = rollstats.outcomeCounts;
+ let okeys = Object.keys(oc);
+ for (var i = 0; i < okeys.length; i++) {
+ let tb = $("#outcomeTable").find("tbody");
+ let outcome: Outcomes = okeys[i];
+ let outcomeCount = rollstats.outcomeCounts[outcome];
+ let outcomePercent = (outcomeCount / rollstats.numRolls * 100).toFixed(2);
+ tb.append(`