示例#1
0
 public bool Validate(EnvironmentSettings envSettings)
 {
     return(this._gridSizeSpec.IsSatisfiedBy(envSettings.GridSize) &&
            this._initialLocationSpec.IsSatisfiedBy(envSettings.Location) &&
            this._instructionSpec.IsSatisfiedBy(envSettings.InstructionSet));
 }
示例#2
0
 /// <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));
 }
示例#3
0
 /// <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);
 }