Bitcoin Forum
September 21, 2018, 12:57:20 PM
 News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 Home Help Search Donate Login Register
 Pages: [1]
 Author Topic: Provably Fair PrimeDice  (Read 31 times)
tchoob
Newbie

Offline

Activity: 4
Merit: 0

 June 11, 2018, 10:20:35 AM

Hello,

i'm actually studying c# and i have to make a provably fair for my dice game,
I trying to reproduce an algorithm similar to that of primedice but i didn't understand why they are doing a " 697969%(10000)/100 " , can someone explain it to me please ?

source https://dicesites.com/provably-fair
1537534640
Hero Member

Offline

Posts: 1537534640

Ignore
 1537534640

1537534640
 Report to moderator
Make a difference with your Ether.
Donate Ether for the greater good.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537534640
Hero Member

Offline

Posts: 1537534640

Ignore
 1537534640

1537534640
 Report to moderator
1537534640
Hero Member

Offline

Posts: 1537534640

Ignore
 1537534640

1537534640
 Report to moderator
bob123
Hero Member

Offline

Activity: 686
Merit: 568

 June 11, 2018, 12:43:21 PM

Thats simple.

697969 is the random number generated.

Modulo 10000 is used to get a number between 0 and 10000, which will then be divided by 100 to get a number between 0 and 100 with 2 digits behind the comma.
This is done because primedice wants to generate numbers in this format.

 ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀ .ChipMixer.{ MIXING REINVENTED FOR YOUR PRIVACY #.ChipMixer. ░░░░░▄▄██████▄▄░░▄████▀▀▀▀▀▀████▄░███▀░░░░░░░░░░▀█▀████░░░▄██████▄▄░░░██░░░░░█████████░░░░██▌░░░░█████████████████░░░░█████████████████░░░░░███████████████████▄░░▀██████▀░░░████▀█▄▄░░░░░░░░░░▄███░░▀████▄▄▄▄▄▄████▀░░░░░▀▀██████▀▀
 Pages: [1]
 « previous topic next topic »