private void AutoSearch() { List <Mine> neiboughers = Mines.GetNeiboughers(A, B); neiboughers.ForEach(x => x.FlatStyle = FlatStyle.Standard); if (this.Arround != 0 && this.Arround == neiboughers.Where(m => m.IsMarked && m.IsBomb).ToList <Mine>().Count&& this.Arround == neiboughers.Where(m => m.IsMarked).ToList <Mine>().Count) { neiboughers.ForEach(x => x.AutoOpen()); } }
public void Check() { if (Mines.IsFinished) { return; } if (!this.IsBomb && !this.IsOpened && this.Arround == 0) { this.Open(); Mines.GetNeiboughers(A, B).ForEach(x => x.Check()); } }
private void Mine_MouseUp(object sender, MouseEventArgs e) { if (Mines.IsFinished) { return; } if (IsLeftPressed && IsRightPressed) { List <Mine> neiboughers = Mines.GetNeiboughers(A, B); neiboughers.Where(x => !x.IsOpened).ToList <Mine>().ForEach(x => x.FlatStyle = FlatStyle.Popup); } if (IsLeftPressed != IsRightPressed) { IsLeftPressed = false; IsRightPressed = false; } }