Exemplo n.º 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;
        }
Exemplo n.º 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)
 {
 }
Exemplo n.º 4
0
 public ConsoleWriter(IConstraintValidator constraintValidator)
 {
     this.constraintValidator = constraintValidator;
 }
 public DomainObject(IConstraintValidator validator) => this._validator = validator;