private void button1_Click(object sender, EventArgs e) { progressBar1.Maximum = REPETITIONS_COUNT; progressBar1.Value = 0; isBatch = true; if (agent == null || agent.Networkstatus == AbstractAgent.NetStatus.NotConnected) { InitializeAgent(); } agent.PlayBatch(HEIGHT, WIDTH, MINES_COUNT, REPETITIONS_COUNT); }