public bool Validate(EnvironmentSettings envSettings) { return(this._gridSizeSpec.IsSatisfiedBy(envSettings.GridSize) && this._initialLocationSpec.IsSatisfiedBy(envSettings.Location) && this._instructionSpec.IsSatisfiedBy(envSettings.InstructionSet)); }
/// <summary> /// Retrieves an enumerable collection of robots. /// </summary> /// <param name="envSettings"> The <see cref="EnvironmentSettings"/> object. </param> /// <returns> Enumerable collection of <see cref="IRobot"/> implementations. </returns> private List <IRobot> GetRobots(EnvironmentSettings envSettings) { return(this._robotFactory.CreateRobots(envSettings)); }
/// <summary> /// Initializes a new instance of the <see cref="SpiderRobot"/> class. /// </summary> /// <param name="envSettings"> /// The env settings. /// </param> /// <param name="movementStrategy"> /// The movement strategy. /// </param> public SpiderRobot(EnvironmentSettings envSettings, IMovementStrategy movementStrategy) { this._movementStrategy = movementStrategy; this.SetProperties(envSettings); }