• Joined on 2021-09-17
kg333 merged pull request projectmoon/tenebrous-dicebot#92 2021-09-26 14:05:57 +00:00
Keep/Drop Function
kg333 pushed to keep_drop_function at kg333/tenebrous-dicebot 2021-09-25 03:54:04 +00:00
7e7e9e534e Adding None enum to keep/drop, cleaning up matches
kg333 commented on pull request projectmoon/tenebrous-dicebot#92 2021-09-25 03:04:43 +00:00
Keep/Drop Function

Added another enum member called None and it's much cleaner. Although members with no type give my C-programmer soul the heebie-jeebies.

kg333 commented on pull request projectmoon/tenebrous-dicebot#92 2021-09-25 02:58:04 +00:00
Keep/Drop Function

Ooh, that's much more human-readable, thanks!

kg333 commented on pull request projectmoon/tenebrous-dicebot#92 2021-09-18 03:40:36 +00:00
Keep/Drop Function

Enum conversion is complete for dice.rs. I left the separate usizes on DiceRoll in place though - I couldn't see a way to update it without complicating DiceRoll::total unnecessarily.

Bot has…

kg333 pushed to keep_drop_function at kg333/tenebrous-dicebot 2021-09-18 03:15:59 +00:00
2d9853fbf0 Updating README for new drop command
kg333 commented on pull request projectmoon/tenebrous-dicebot#92 2021-09-18 03:13:03 +00:00
Keep/Drop Function

After looking at it further, the weird error type is irrelevant. Every possible arm of the match at this point either assigns Drop or Keep, or leaves a default Keep = Count if the parse fails.

kg333 pushed to keep_drop_function at kg333/tenebrous-dicebot 2021-09-18 03:11:18 +00:00
3d6210b32d Adding enum for exclusive drop/keep
kg333 pushed to keep_drop_function at kg333/tenebrous-dicebot 2021-09-18 02:18:29 +00:00
8b5973475f Forgot to fix tests, fixing keep/drop Err case
kg333 pushed to keep_drop_function at kg333/tenebrous-dicebot 2021-09-18 02:08:55 +00:00
1992ef4e08 Updating roll doc
kg333 pushed to keep_drop_function at kg333/tenebrous-dicebot 2021-09-18 02:07:36 +00:00
f904e3a948 Updating match blocks for keep/drop
kg333 commented on pull request projectmoon/tenebrous-dicebot#92 2021-09-18 02:05:31 +00:00
Keep/Drop Function

This is proving more difficult than I anticipated: it looks like nom is using its own error type? Not sure how to resolve this one, although I agree unwrap is a problem.

error[E0271]: type…
kg333 commented on pull request projectmoon/tenebrous-dicebot#92 2021-09-18 01:00:24 +00:00
Keep/Drop Function

I'll give those changes a stab. While in theory you could have both "drop highest" and "keep highest i.e. drop lowest" on the same roll, I didn't provide a way to enter it, so an enum make sense…

kg333 created pull request projectmoon/tenebrous-dicebot#92 2021-09-17 03:36:07 +00:00
Keep/Drop Function
kg333 pushed to keep_drop_function at kg333/tenebrous-dicebot 2021-09-17 03:32:40 +00:00
8317f40f61 Updating README for keep/drop
069ee47364 Adding drop function
dc242182f4 Fix string comparison in keep/count check, and add test cases
15163ac11d Adding calculations for keep, and adding validation on keep input
1860eaf378 Adding parsing for keeping highest dice
kg333 created repository kg333/tenebrous-dicebot 2021-09-17 03:31:35 +00:00