private void button2_Click(object sender, EventArgs e) { theCar.SpeedIncr = Int32.Parse(textBox2.Text); if (theCar.Accelerate(theCar.Brand == "Mercedes")) { theCar.Accelerate(true); } else { theCar.Accelerate(); } updateUI(); }
private void button2_Click(object sender, EventArgs e) { theCar.Accelerate(Int32.Parse(textBox2.Text)); updateUI(); }