bertieb
f3447efaf2
(BE) update RollStats: set numDice in constructor
преди 3 години
bertieb
555375c18d
(FE) Modularise adding results card
преди 3 години
bertieb
295c9a73f7
(FE) Make results panels collapsible
Also include bootstrap.js to make collapsing actually work, and change
order of links in head to ensure js is included in the 'correct' order
преди 3 години
bertieb
5aa826c086
(FE) Display in 3 columns
преди 3 години
bertieb
5b901dd538
Fix watched build bug
преди 3 години
bertieb
90ff20ea7f
v0.1.3 add 'gulp zip' command
преди 3 години
bertieb
3e187638c3
0.1.1
преди 3 години
bertieb
f80ac3dfa0
Add 'gulp build' task which is not watchify'd
преди 3 години
bertieb
6759a07829
Move asphotheme.css to root dir
преди 3 години
bertieb
1696f38ceb
Add undefined check to avoid TS2532
преди 3 години
bertieb
e8900c5aac
Minor wording change
преди 3 години
bertieb
a879a3df80
Add preamble describing rolls
преди 3 години
bertieb
fb6e8e9d7b
Remove scripts included via npm/browserify
преди 3 години
bertieb
ef598d2c98
Sort outcome balance data for chart
преди 3 години
bertieb
0db3441b97
Remove legend pos on bar charts as not displayed
преди 3 години
bertieb
f1f6dd7217
Reverse legend and change colours on Reroll chart
преди 3 години
bertieb
a08472a6b8
Refactored most report generation to functions
Is it less monolithic? Yes
Is it actually any better? Uhh
This is still doing some reasonably code-smelly things which could
probably be improved with a decent JavaScript templating engine, but:
- it's after 10PM on a SAturday night and I've been working on this all
afternoon
- it works for now
- I don't want to go too far down the rabbit hole of super-polished code
(hah!) before I check that the output format suits C
It is actually better in the sens that we present charts first (easier
to see at a glance) with their data below them.
Todo:
- sort output of outcomesBalance for chart (already sorted for table)
- hide/show toggles
- make the doughnut chart more straightforward (swap legend order,
rename labels)
преди 3 години
bertieb
749e6bb376
Refactor tables to makeTableSkeleton()
преди 3 години
bertieb
0f8d65331b
Add Chart.js & google-palette node deps, refactor
преди 3 години
bertieb
0799b45039
Add charts to frontend (Chart.js)
This is still pretty quick and dirty, with lots of refactoring and
general tidying up ahead; but it gives an example structure to start
from
преди 3 години
bertieb
b15ccf90c4
Add quick-and-dirty FE
Emphasis on the dirty, not so much 'quick' ! This shows select outputs
from the default Asphodice class:
- rerolls
- outcome balance
- outcomes
This information is presented in a Bootstrap card:
https://getbootstrap.com/docs/5.0/components/card/
преди 3 години
bertieb
498412fca0
Add basic frontend (jQuery+Bootstrap) stub
преди 3 години
bertieb
bae389fc53
Add watchify, browserify & other deps
In dev mode this means changes to ts files can now be watched
live.
преди 3 години
bertieb
5591e0a904
Add README
преди 3 години
bertieb
2f032f5c37
Update test paths
преди 3 години
bertieb
75385132a9
Add gulp for automated builds & Boostrap for FE
Can now build all with 'gulp' (if gulp-cli installed)
Big commit. Breakdown:
- .gitignore includes gulpfile.js (otehrwise excluded)
- gulpfile sets up build steps + browsersync
- src/ files for FE (stub for now)
- moved ts to src/ for consistency
- update tsconfig with new paths
- package.json lists new reqs
преди 3 години
bertieb
501d9d37db
Package info and ignores
преди 3 години
bertieb
cdc9252d45
Move roll stats functions to class RollStats
преди 3 години
bertieb
250695b004
Add individual dice and outcome counts
преди 3 години
bertieb
d4168b7a9a
Initial rollstats (and add entry to tsconfig)
преди 3 години
bertieb
2fc974aa3a
Don't hard code number of dice/rolls
преди 3 години
bertieb
8c3d35fd3c
Export DiceResult, remove dice-counting interfaces
преди 3 години
bertieb
c8e6b6bcf5
Move Asphodice class (etc) to own module
преди 3 години
bertieb
ec315db5a4
export Outcomes + simplify reroll abovebelow check
преди 3 години
bertieb
0c79af9ae2
Include dice.ts so tests compile correctly
преди 3 години
bertieb
bea2bb5c66
Add outcomes + outcomeBalance tests
преди 3 години
bertieb
effc85c13f
Rewrite tests to re-use candidates
преди 3 години
bertieb
14f32e812f
Add tests using Mocha+Chai
преди 3 години
bertieb
0f1fb9ef3b
'Cancel out' reroll pairs when determining re-roll
преди 3 години
bertieb
dde3e66bf0
add cancelRerollDice() as helper function
Cancels out 10s and 1s, for use in rerollNeeded()
преди 3 години
bertieb
22170650c0
Split reroll-determining to own function
Aids unit testing which is needed for good practice and as we
are seeing bugs creep in around unnecessary rerolls
преди 3 години
bertieb
ac0b877685
Add outcome to dice result
Also start sketching out results set for aggregate results
преди 3 години
bertieb
fd42ead81b
Remove unnecessary constructor(), add print line
преди 3 години
bertieb
5730671b27
Rewrite inline comments in TSDoc style
преди 3 години
bertieb
1fe526f1d5
Add countOutcomeBalance - balance successes/fails
преди 3 години
bertieb
110a574b8a
Initial version, rolls 4 asphodice with rerolls
преди 3 години