Build a simple dice game Rest API
In this exercise, we would be building a simple dice game in Go.
When a game is started, a commitment fee of 12 sats (satoshis) is deducted from the user’s wallet, and a number is generated randomly between 2 and 12 and stored. This number should be visible to the user.
After a game has been started, the user is allowed to roll a dice (twice for every session), and the result of both dice rolls is summed up. If the sum of the 2 numbers (in this session) is equal to the number generated at game start-up, the user wins 16 sats.
The user can roll dice as many times as he wants in a single game; however, the user is charged 3 sats at the beginning of every 2 dice rolls.