Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dice variables #133

Merged
merged 29 commits into from
Jul 17, 2022
Merged

Dice variables #133

merged 29 commits into from
Jul 17, 2022

Conversation

L0neGamer
Copy link
Collaborator

dread it
run from it
dice variables are here

including a multitude of changes to the monad stack for dice rolling, parsing dice as a whole, if statements, and let statements (which allow storing of variables as well as lazy evaluation of variables to simulate functions)

@L0neGamer
Copy link
Collaborator Author

This PR would end this issue finally: #66

Copy link
Collaborator

@finnbar finnbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pleasantly surprised - that was far less difficult to read than I thought it would be. The State monad is doing really wonderful work in simplifying things here. I've added a bunch of comments (most wrt renaming let to var) and found a bug in the stats that needs fixing, but otherwise it seems to work well. Nicely done.

docs/Roll.md Outdated Show resolved Hide resolved
Comment on lines +110 to +111
- set (integer, integer, list) - set the item at the index of the first integer to the value of the second integer in the given list
- insert (integer, integer, list) - insert the item at the index of the first integer to the value of the second integer in the given list
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention that these are 0-indexed.

src/Tablebot/Plugins/Roll/Dice.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice.hs Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice/DiceParsing.hs Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice/DiceStats.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Plugin.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Plugin.hs Outdated Show resolved Hide resolved
src/Tablebot/Plugins/Roll/Dice/DiceEval.hs Outdated Show resolved Hide resolved
@finnbar finnbar merged commit 8a4072b into WarwickTabletop:main Jul 17, 2022
@finnbar finnbar mentioned this pull request Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants