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

Providing instant_roll and booked_roll #2

Open
cusma opened this issue Dec 22, 2022 · 1 comment
Open

Providing instant_roll and booked_roll #2

cusma opened this issue Dec 22, 2022 · 1 comment

Comments

@cusma
Copy link
Owner

cusma commented Dec 22, 2022

I see. I think I will take the best of two worlds in a future PR, refactoring the methods as follows:

  • Turning dice_rolls into an internal subroutine;
  • Provide a instant_roll, which takes the round a player want as method input;
  • Provide a booked_roll, which takes the round a player as previously committed to.

Originally posted by @cusma in #1 (comment)

@fabrice102
Copy link
Collaborator

fabrice102 commented Dec 22, 2022

Yes, that's a good option. It is also important to make it clear in the README and contract metadata that the contract should only be called once for a given round, using either instant_roll or booked_roll (even for a different set of dices).
With a counter-example.

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

No branches or pull requests

2 participants