public void Initialize(IWeaponSelectionModel weaponSelectionModel)
        {
            _weaponSelectionModel = weaponSelectionModel;
            OnPropertyChanged(Properties.IsMissile);
            OnPropertyChanged(Properties.IsWeaponSelected);

            SelectedCoilgunType = CoilgunTypes.FirstOrDefault();
            SelectedMissileType = MissileTypes.FirstOrDefault();
        }
示例#2
0
        public void Initialize(IWeaponSelectionModel weaponSelectionModel)
        {
            _weaponSelectionModel = weaponSelectionModel;
            OnPropertyChanged(Properties.IsMissile);
            OnPropertyChanged(Properties.IsWeaponSelected);

            SelectedCoilgunType = CoilgunTypes.FirstOrDefault();
            SelectedMissileType = MissileTypes.FirstOrDefault();
        }
示例#3
0
        public LaunchBoardModel(IUnitModel launchingUnit, IUnitModel targetUnit, ICurrentTurnModel currentTurn)
        {
            if (launchingUnit == null)
            {
                throw new ArgumentNullException("launchingUnit");
            }

            if (targetUnit == null)
            {
                throw new ArgumentNullException("targetUnit");
            }

            _avidCalculator           = ServiceFactory.Library.AvidCalculator;
            _hexGridCalculator        = ServiceFactory.Library.HexGridCalculator;
            _hexVectorUtility         = ServiceFactory.Library.HexVectorUtility;
            _firingSolutionCalculator = ServiceFactory.Library.FiringSolutionCalculator;
            _shellstarBuilder         = ServiceFactory.Library.ShellstarBuilder;
            _weaponSelectionModel     = new WeaponSelectionModel();

            _launchingUnit = launchingUnit;
            _targetUnit    = targetUnit;
            _currentTurn   = currentTurn;
        }
示例#4
0
        public LaunchBoardModel(IUnitModel launchingUnit, IUnitModel targetUnit, ICurrentTurnModel currentTurn)
        {
            if (launchingUnit == null)
            {
                throw new ArgumentNullException("launchingUnit");
            }

            if (targetUnit == null)
            {
                throw new ArgumentNullException("targetUnit");
            }

            _avidCalculator = ServiceFactory.Library.AvidCalculator;
            _hexGridCalculator = ServiceFactory.Library.HexGridCalculator;
            _hexVectorUtility = ServiceFactory.Library.HexVectorUtility;
            _firingSolutionCalculator = ServiceFactory.Library.FiringSolutionCalculator;
            _shellstarBuilder = ServiceFactory.Library.ShellstarBuilder;
            _weaponSelectionModel = new WeaponSelectionModel();

            _launchingUnit = launchingUnit;
            _targetUnit = targetUnit;
            _currentTurn = currentTurn;
        }