Implement backward bisect

This commit is contained in:
2025-03-16 22:33:38 +01:00
parent 0a9d97074f
commit 9192e68bd3
2 changed files with 31 additions and 0 deletions

View File

@@ -34,6 +34,14 @@ class ModListTroubleshooter {
}
ModList binaryBackward() {
final midIndex = ((_startIndex + _endIndex) / 2).ceil();
final subset = originalModList.activeMods.keys.toList().sublist(
0,
midIndex,
);
currentModList.disableAll();
currentModList.enableMods(subset);
_endIndex = midIndex;
return currentModList;
}