Uses default Asphodice class, rolls sets of 1..10 dice 100000 times for
stats.
Future work will need minor extensions of base Asphodice class, such as:
- class short name (for HTML element ids)
- class description (to explain what mechanics are implemented-
eg different successCutoff)
FE will also need adapted:
- ids will need to use class short names (as above)
- result cards
- chart canvases
- tables
- anchors for 'jump to' navigation (see next item)
- grouping of dice class results with show/hide groups (or
tabs or some other means of selecting results, eg dropdown), eg:
- Asphodice
- d=1
- d=2
- ...
- d=10
- AsphodiceCutoff8
- d=1
- d=2
- ...
- d=10
- AsphodiceCrits
- d=1
- d=2
- ...
- d=10
(etc)
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)
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/
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