public static void BruteForce() { Input.USE_TAS_INPUT_Y = false; HashSet <int> seenRngIndexes = new HashSet <int>(); for (int count = 0; true; count++) { List <Input> inputs = GenerateInputs(); ObjSlotManager objSlotManager = Simulate(inputs, false); if (objSlotManager != null) { int rngIndex = objSlotManager.Rng.GetIndex(); (int numInitialBubbles, bool isBubbleSpawnerPresent) = objSlotManager.GetBubbleConfiguration(); int numTries = 1; seenRngIndexes.Add(rngIndex); Config.Print("CHECKING SECOND SUCCESS {0} {1} {2} {3}", rngIndex, isBubbleSpawnerPresent, numInitialBubbles, seenRngIndexes.Count); bool success2 = LoadingZoneMain.Run(rngIndex, isBubbleSpawnerPresent, numInitialBubbles, numTries, true); if (success2) { Config.Print(); Config.Print("SUCCESS AFTER " + count); Config.Print(); Config.Print(string.Join("\r\n", inputs)); Config.Print(); Simulate(inputs, true); Config.Print(); return; } } } }
public static void FindAllBubbleConfigurations() { ObjSlotManager objSlotManager = new ObjSlotManager(new List <Input>()); for (int i = 0; i < 1000; i++) { objSlotManager.Update(); } HashSet <(int numBubbles, bool bubbleSpawnerPresent)> alreadySeen = new HashSet <(int numBubbles, bool bubbleSpawnerPresent)>(); while (true) { objSlotManager.Update(); var bubbleConfiguration = objSlotManager.GetBubbleConfiguration(); if (!alreadySeen.Contains(bubbleConfiguration)) { Config.Print(bubbleConfiguration); alreadySeen.Add(bubbleConfiguration); } } }