public void ApplyFullRangeRandomActions(RandomNessProvider randomNessProvider) { while (Lander.Status == LanderStatus.Flying) { var randomAngle = randomNessProvider.GetRandomAngle(); var randomPower = randomNessProvider.GetRandomPower(); Lander.Apply(randomAngle, randomPower, _environment); } }
public void ApplyActions(IEnumerable <string> actions) { foreach (var actionArray in actions.Select(action => action.Split(" "))) { if (Lander.Status != LanderStatus.Flying) { continue; } Lander.Apply(int.Parse(actionArray[0]), int.Parse(actionArray[1]), _environment); } }
public void ApplyAction(string action) { var actionArray = action.Split(" "); Lander.Apply(int.Parse(actionArray[0]), int.Parse(actionArray[1]), _environment); }