Implement parts of linear search and add more test cases for bisect
This commit is contained in:
@@ -48,11 +48,28 @@ class ModListTroubleshooter {
|
||||
return currentModList;
|
||||
}
|
||||
|
||||
ModList linearForward() {
|
||||
ModList linearForward({int stepSize = 20}) {
|
||||
_endIndex = _startIndex + stepSize;
|
||||
final subset = originalModList.activeMods.keys.toList().sublist(
|
||||
_startIndex,
|
||||
_endIndex,
|
||||
);
|
||||
currentModList.disableAll();
|
||||
currentModList.enableMods(subset);
|
||||
_startIndex = _endIndex;
|
||||
return currentModList;
|
||||
}
|
||||
|
||||
ModList linearBackward() {
|
||||
ModList linearBackward({int stepSize = 20}) {
|
||||
_startIndex = _endIndex - stepSize;
|
||||
_endIndex = _startIndex;
|
||||
final subset = originalModList.activeMods.keys.toList().sublist(
|
||||
_startIndex,
|
||||
_endIndex,
|
||||
);
|
||||
currentModList.disableAll();
|
||||
currentModList.enableMods(subset);
|
||||
_endIndex = _startIndex;
|
||||
return currentModList;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user