//menghandle klik untuk menu DFS private void menuDFS_Click(object sender, System.EventArgs e) { if (STOP) { solve = new Solver(this); STOP = false; PAUSE = false; SHOW = true; editorB = false; editor.setCols(0); editor.setRows(0); player = false; newgame = false; init(); this.Controls.Add(btn3); this.Controls.Add(btn2); this.Controls.Add(btn4); btn4.Text = "HIDE"; TimerElapsed.Enabled = true; if (solve.solvedfs() && !player && !newgame && !editorB && !board.isNull() && !STOP) { Invalidate(); TimerElapsed.Enabled = false; new System.Media.SoundPlayer(Properties.Resources.Sonic_Boom).Play(); MessageBox.Show("You have finished the game !!", "PentoMaster", MessageBoxButtons.OK, MessageBoxIcon.Information); Invalidate(); STOP = true; } else { MessageBox.Show("Solusi tidak ketemu!!", "PentoMaster", MessageBoxButtons.OK, MessageBoxIcon.Information); TimerElapsed.Enabled = false; STOP = true; } } }