Skip to content
Snippets Groups Projects

Muz mutation

1 file
+ 28
3
Compare changes
  • Side-by-side
  • Inline
+ 28
3
@@ -53,4 +53,29 @@ public enum Instruction {
return "\"" + opcode + "\"" + operandsString;
}
public Instruction fromStringToInstruction(String input) {
int end_command = input.indexOf(" ");
String command = "";
if (end_command != -1) {
command += input.substring(0, end_command);
}
if (command == "put") {
return Instruction.PUT;
} else if (command == "get") {
return Instruction.GET;
} else if (command == "rem") {
return Instruction.REM;
} else if (command == "save") {
return Instruction.SAVE;
} else if (command == "list") {
return Instruction.LIST;
} else if (command == "masterpw") {
return Instruction.MASTERPW;
}
return null;
}
}
Loading