public int Command_MovePatch(int index, int offset) {
if (index < 0 || index >= Instructions.Count) {
throw new ArgumentException("Specified instruction was not in the sequence.");
}
var instruction = Instructions[index];
var newIndex = index + offset;
if (newIndex < 0 || newIndex >= Instructions.Count) {
return index;
}
var oldOccupant = Instructions[newIndex];
Instructions[index] = oldOccupant;
Instructions[newIndex] = instruction;
return newIndex;
}