Ejemplo n.º 1
0
 private void btnRunInRobocode_Click(object sender, EventArgs e) {
   using (var battleRunnerDlg = new BattleRunnerDialog(Content)) {
     var result = battleRunnerDlg.ShowDialog(this);
     if (result == DialogResult.OK) {
       var enemies = battleRunnerDlg.Enemies;
       string path = enemies.RobocodePath;
       int nrOfRounds = battleRunnerDlg.NrOfRounds;
       Interpreter.EvaluateTankProgram(Content.Tree, path, enemies, programName, true, nrOfRounds);
     }
   }
 }
Ejemplo n.º 2
0
 private void btnRunInRobocode_Click(object sender, EventArgs e)
 {
     using (var battleRunnerDlg = new BattleRunnerDialog(Content)) {
         var result = battleRunnerDlg.ShowDialog(this);
         if (result == DialogResult.OK)
         {
             var    enemies    = battleRunnerDlg.Enemies;
             string path       = enemies.RobocodePath;
             int    nrOfRounds = battleRunnerDlg.NrOfRounds;
             Interpreter.EvaluateTankProgram(Content.Tree, path, enemies, programName, true, nrOfRounds);
         }
     }
 }