C
C#2y ago
kiran

✅ Why is rng not working?

https://docs.google.com/document/d/1r9a7-K_GiWhBarvFvC_fvRdVF9cziu05_HXtAk1gu_k/edit?usp=sharing The dice only rolls 2 and 2, please help its due friday, making casino game craps
Google Docs
ghughjdashlha
using System; using System.Collections; using System.Threading; namespace EX25_FreeForAll { class Program { static void Main(string[] args) { double wager = betmoney(); int dicenum1 = Dice1(); int dicenum2 = Dice2(); printDi...
4 Replies
phaseshift
phaseshift2y ago
$code
MODiX
MODiX2y ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Angius
Angius2y ago
My best is on you creating a new Random every time Create one instance of it and reuse it Or, instead of
var rng = new Random();
var num = rng.Next(0, 6);
var rng = new Random();
var num = rng.Next(0, 6);
use
var num = Random.Shared.Next(0, 6);
var num = Random.Shared.Next(0, 6);
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity. Closed!
Want results from more Discord servers?
Add your server