예제 #1
0
        public Player(IConstraintValidator constraintValidator, IBattlefieldSetter battlefieldSetter, GameConstraint gameConstraint)
        {
            this.constraintValidator = constraintValidator;
            this.battlefieldSetter   = battlefieldSetter;
            this.gameConstraint      = gameConstraint;

            ValidateConstraint(gameConstraint);
            InitializeBattlefieldAnalyzer();
            name = gameConstraint.PlayerName;
        }
예제 #2
0
 public BattleshipExecutor(IGameConstraintsParser gameConstraintsParser,
                           IConstraintValidator constraintValidator,
                           IBattlefieldSetter battlefieldSetter,
                           IConsoleWriter consoleWriter)
 {
     this.gameConstraintsParser = gameConstraintsParser;
     this.constraintValidator   = constraintValidator;
     this.battlefieldSetter     = battlefieldSetter;
     this.consoleWriter         = consoleWriter;
 }
 public OrderDomainModel(IConstraintValidator validator) : base(validator)
 {
 }
예제 #4
0
 public ConsoleWriter(IConstraintValidator constraintValidator)
 {
     this.constraintValidator = constraintValidator;
 }
 public DomainObject(IConstraintValidator validator) => this._validator = validator;