cusma / algo-dices

🎲 Let's roll dices on Algorand!
MIT License
4 stars 1 forks source link

Providing `instant_roll` and `booked_roll` #2

Open cusma opened 1 year ago

cusma commented 1 year ago

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 https://github.com/cusma/algo-dices/pull/1#discussion_r1055876318_

fabrice102 commented 1 year ago

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.