public Board(IMovingEngine movingEngine, IPositionValidatorsCreator positionValidatorsCreator, IEnumerable <IPlayer> players, int size) { this.movingEngine = movingEngine; this.positionValidators = positionValidatorsCreator.Create(size); this.players = players; this.width = size; this.length = size; }
public BoardFactory(IMovingEngine movingEngine, IPositionValidatorsCreator positionValidatorsCreator) { this.movingEngine = movingEngine ?? throw new ArgumentNullException(nameof(movingEngine), "All arguments needs to provided."); this.positionValidatorsCreator = positionValidatorsCreator ?? throw new ArgumentNullException(nameof(positionValidatorsCreator), "All arguments needs to provided."); }