private AddCommandMutation GetMutationForNewInt(ICommandsList commands, NewInt command, int indexToAdd) { var random = new AddRandom(); random.TuneNewInt(command.Name, indexToAdd); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForStop(ICommandsList commands, int indexToAdd) { var random = new AddRandom(); random.TuneStop(indexToAdd); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForSetValue(ICommandsList commands, SetValue command, int indexToAdd) { var random = new AddRandom(); var declarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); random.TuneSetValue(declarationIndex, command.Value, indexToAdd); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForConditionBlock(ICommandsList commands, Condition command, int ifIndex, int endIfIndex) { var random = new AddRandom(); var declarationIndex = GetDeclarationIndexOfVariable(command.ConditionName, commands); random.TuneConditionBlock(declarationIndex, ifIndex, endIfIndex); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForPrint(ICommandsList commands, Print command, int indexToAdd) { var random = new AddRandom(); var declarationIndex = GetDeclarationIndexOfVariable(command.Variable, commands); random.TunePrint(declarationIndex, indexToAdd); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForGetRandom(ICommandsList commands, GetRandom command, int indexToAdd) { var random = new AddRandom(); var targetDeclarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); var sourceDeclarationIndex = GetDeclarationIndexOfVariable(command.MaxValueName, commands); random.TuneGetRandom(targetDeclarationIndex, sourceDeclarationIndex, indexToAdd); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForGetState(ICommandsList commands, GetState command, int indexToAdd) { var random = new AddRandom(); var targetDeclarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); var direction = command.Direction; random.TuneGetState(targetDeclarationIndex, direction, indexToAdd); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForPlus(ICommandsList commands, Plus command, int indexToAdd) { var random = new AddRandom(); var targetDeclarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); var firstSourceDeclarationIndex = GetDeclarationIndexOfVariable(command.FirstSource, commands); var secondSourceDeclarationIndex = GetDeclarationIndexOfVariable(command.SecondSource, commands); random.TunePlus(targetDeclarationIndex, firstSourceDeclarationIndex, secondSourceDeclarationIndex, indexToAdd); return(new AddCommandMutation(random, commands)); }
private AddCommandMutation GetMutationForStop(ICommandsList commands, int indexToAdd) { var random = new AddRandom(); random.TuneStop(indexToAdd); return new AddCommandMutation(random, commands); }
private AddCommandMutation GetMutationForSetValue(ICommandsList commands, SetValue command, int indexToAdd) { var random = new AddRandom(); var declarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); random.TuneSetValue(declarationIndex, command.Value, indexToAdd); return new AddCommandMutation(random, commands); }
private AddCommandMutation GetMutationForPrint(ICommandsList commands, Print command, int indexToAdd) { var random = new AddRandom(); var declarationIndex = GetDeclarationIndexOfVariable(command.Variable, commands); random.TunePrint(declarationIndex, indexToAdd); return new AddCommandMutation(random, commands); }
private AddCommandMutation GetMutationForPlus(ICommandsList commands, Plus command, int indexToAdd) { var random = new AddRandom(); var targetDeclarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); var firstSourceDeclarationIndex = GetDeclarationIndexOfVariable(command.FirstSource, commands); var secondSourceDeclarationIndex = GetDeclarationIndexOfVariable(command.SecondSource, commands); random.TunePlus(targetDeclarationIndex, firstSourceDeclarationIndex, secondSourceDeclarationIndex, indexToAdd); return new AddCommandMutation(random, commands); }
private AddCommandMutation GetMutationForNewInt(ICommandsList commands, NewInt command, int indexToAdd) { var random = new AddRandom(); random.TuneNewInt(command.Name, indexToAdd); return new AddCommandMutation(random, commands); }
private AddCommandMutation GetMutationForGetState(ICommandsList commands, GetState command, int indexToAdd) { var random = new AddRandom(); var targetDeclarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); var direction = command.Direction; random.TuneGetState(targetDeclarationIndex, direction, indexToAdd); return new AddCommandMutation(random, commands); }
private AddCommandMutation GetMutationForGetRandom(ICommandsList commands, GetRandom command, int indexToAdd) { var random = new AddRandom(); var targetDeclarationIndex = GetDeclarationIndexOfVariable(command.TargetName, commands); var sourceDeclarationIndex = GetDeclarationIndexOfVariable(command.MaxValueName, commands); random.TuneGetRandom(targetDeclarationIndex, sourceDeclarationIndex, indexToAdd); return new AddCommandMutation(random, commands); }
private AddCommandMutation GetMutationForConditionBlock(ICommandsList commands, Condition command, int ifIndex, int endIfIndex) { var random = new AddRandom(); var declarationIndex = GetDeclarationIndexOfVariable(command.ConditionName, commands); random.TuneConditionBlock(declarationIndex, ifIndex, endIfIndex); return new AddCommandMutation(random, commands); }