Testing out RandN for better quality random. Also took out seeds until I can find a way to implement it that doesn't completely break gambling

This commit is contained in:
barelyprofessional
2025-10-05 01:40:05 -05:00
parent 115506ba42
commit cb7337375d
2 changed files with 6 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ using KfChatDotNetBot.Settings;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using NLog;
using RandN;
using RandN.Compat;
using RandN.Rngs;
namespace KfChatDotNetBot.Services;
@@ -423,7 +426,8 @@ public static class Money
public static int GetRandomNumber(GamblerDbModel gambler, int min, int max, int iterations = 10,
bool incrementMaxParam = true)
{
var random = new Random(gambler.RandomSeed.GetHashCode());
var rng = StandardRng.Create();
var random = RandomShim.Create(rng);
var result = 0;
var i = 0;
if (incrementMaxParam) max++;