Dice game probabilities: Difference between revisions

Line 1,302:
local m=@PlayAll(dice1,dice2, games) : local tt=timecount
print "Time to fill the buffer with random bytes ";str$(tt, "#0.00 ms")
local s1=dice1-1, s2=dice2-1, k, l, t, f1=face1/256, f2=face2/256, i, n1=0&, n2=0&
print "Buffer size ";str$(len(m)/1024,"#0.#");" Kbyte": Refresh
profiler
Line 1,310:
if n1>n2 then k++ else if n1<n2 then l++
next
t=games-k-l
print "Games Total "; games
print "Player 1 wins ";k; " probability of winning:" ;str$(k/games, "#0.00 %")
print "Player 2 wins ";l; " probability of winning:" ;str$(l/games, "#0.00 %")
print "Number of ties ";tgames-k-l
print "Execution time ";str$(timecount/1000, "#0.0 s")
End Sub
404

edits