Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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.");
 }