Moved .rps to the new service, reimplemented logic, fixed an unknown bug with 0 amount (?!)

This commit is contained in:
Kwoth
2022-07-13 23:48:03 +02:00
parent 0f1ba400db
commit 17ca609fe9
7 changed files with 198 additions and 139 deletions

View File

@@ -2,10 +2,10 @@ namespace Nadeko.Econ.Gambling;
public sealed class BetrollGame
{
private readonly (decimal WhenAbove, decimal MultiplyBy)[] _thresholdPairs;
private readonly Random _rng;
private readonly (int WhenAbove, decimal MultiplyBy)[] _thresholdPairs;
private readonly NadekoRandom _rng;
public BetrollGame(IReadOnlyList<(decimal WhenAbove, decimal MultiplyBy)> pairs)
public BetrollGame(IReadOnlyList<(int WhenAbove, decimal MultiplyBy)> pairs)
{
_thresholdPairs = pairs.OrderByDescending(x => x.WhenAbove).ToArray();
_rng = new();