private void QuantumForm_Paint(object sender, PaintEventArgs e) { if (e.Graphics == null) { return; } restartButton.Visible = game.playNext(e.Graphics, Width, Height); restartButton.Enabled = restartButton.Visible; }
private void onTimer(object sender, EventArgs e) { using (Graphics graphics = this.CreateGraphics()) { game.playNext(graphics); } }