Skip to content

Commit

Permalink
millions must var
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidenkrz committed Dec 22, 2024
1 parent 48da653 commit e95cedc
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,19 @@ private void StartRound(EntityUid uid, SuspicionRuleComponent component, GameRul
RobustRandom.Shuffle(participatingPlayers); // I really don't trust the shuffle.
*/

int seed1 = (int)(Math.Sin(RobustRandom.Next()) * 10000);
int seed2 = (int)(Math.Cos(RobustRandom.Next()) * 10000);
int combinedSeed = seed1 ^ seed2;
var seed1 = (int)(Math.Sin(RobustRandom.Next()) * 10000);
var seed2 = (int)(Math.Cos(RobustRandom.Next()) * 10000);
var combinedSeed = seed1 ^ seed2;

RobustRandom.SetSeed(combinedSeed);

int depth = 5;
var depth = 5;
while (depth > 0)
{
int chaoticSeed = (int)Math.Pow(RobustRandom.Next(), 3) ^ (RobustRandom.Next() % 10000);
var chaoticSeed = (int)Math.Pow(RobustRandom.Next(), 3) ^ (RobustRandom.Next() % 10000);
RobustRandom.SetSeed(chaoticSeed);

int halfCount = participatingPlayers.Count / 2;
var halfCount = participatingPlayers.Count / 2;
var shuffledSubset = participatingPlayers.Take(halfCount).ToList();
RobustRandom.Shuffle(shuffledSubset);
participatingPlayers.RemoveRange(0, halfCount);
Expand All @@ -148,7 +148,7 @@ private void StartRound(EntityUid uid, SuspicionRuleComponent component, GameRul
participatingPlayers.Clear();
participatingPlayers.AddRange(reorderedPlayers);

for (int i = 0; i < 3; i++)
for (var i = 0; i < 3; i++)
{
RobustRandom.SetSeed(RobustRandom.Next());
RobustRandom.Shuffle(participatingPlayers);
Expand Down

0 comments on commit e95cedc

Please sign in to comment.