コード例 #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;
 }
コード例 #3
0
 public OrderDomainModel(IConstraintValidator validator) : base(validator)
 {
 }
コード例 #4
0
 public ConsoleWriter(IConstraintValidator constraintValidator)
 {
     this.constraintValidator = constraintValidator;
 }
コード例 #5
0
 public DomainObject(IConstraintValidator validator) => this._validator = validator;