Exemple #1
0
        private void SetHumanInterventionType()
        {
            int selected = this.comboBox1.SelectedIndex;

            switch (selected)
            {
            case 1:
                humanIntervention = new DirectGroup(Swarm.rand, this.scouts);
                break;

            case 2:
                humanIntervention = new ManipulateBlob(Swarm.rand, this.scouts);
                break;

            case 3:
                humanIntervention = new SelectARegion(Swarm.rand);
                break;

            case 4:
                humanIntervention = new TaskDistribution(Swarm.rand);
                break;

            default:
                humanIntervention = null;
                break;
            }
        }
Exemple #2
0
 private void SetHumanInterventionType() {
     int selected = this.comboBox1.SelectedIndex;
     switch (selected) {
         case 1:
             humanIntervention = new DirectGroup(Swarm.rand, this.scouts);
             break;
         case 2:
             humanIntervention = new ManipulateBlob(Swarm.rand, this.scouts);
             break;
         case 3:
             humanIntervention = new SelectARegion(Swarm.rand);
             break;
         case 4:
             humanIntervention = new TaskDistribution(Swarm.rand);
             break;
         default:
             humanIntervention = null;
             break;
     }
 }