private void InitializeModel()
        {
            var masterAccuracy = Convert.ToDouble(nudMasterAccuracy.Value);
            var master         = new MasterDestroyer(masterAccuracy);

            var slaveAccuracy = Convert.ToDouble(nudSlaveAccuracy.Value);
            var slaves        = new [] { new SlaveDestroyer(slaveAccuracy),
                                         new SlaveDestroyer(slaveAccuracy) };

            var defenseAccuracy = Convert.ToDouble(nudDefenseAccuracy.Value);
            var defense         = new Defense(defenseAccuracy);

            var accuracy11  = Convert.ToDouble(nud11Accuracy.Value);
            var accuracyAll = Convert.ToDouble(nudAllAccuracy.Value);

            _model.Initialize(master, slaves, defense,
                              accuracyAll, accuracy11);
        }
Пример #2
0
 public void Initialize(MasterDestroyer master, SlaveDestroyer[] slaves, Defense defense,
                        double accuracy_all, double accuracy_1_1)
 {
     _attackGroup = new AttackGroup(master, slaves, accuracy_all, accuracy_1_1);
     _defense     = defense;
 }