Bitcoin Forum
September 29, 2020, 08:42:42 PM *
News: Latest Bitcoin Core release: 0.20.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Provably Fair PrimeDice  (Read 67 times)
tchoob
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
June 11, 2018, 10:20:35 AM
 #1

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
1601412162
Hero Member
*
Offline Offline

Posts: 1601412162

View Profile Personal Message (Offline)

Ignore
1601412162
Reply with quote  #2

1601412162
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
bob123
Legendary
*
Offline Offline

Activity: 1330
Merit: 2075



View Profile WWW
June 11, 2018, 12:43:21 PM
Last edit: June 11, 2018, 02:14:27 PM by bob123
 #2

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.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!