void buttonOnePlayer_ClickUp(object sender, MouseEventHandler e) { Global.SoundClick.Play(Global.Sound, 1f, 0f); mangala = new MangalaGame(ScreenWidth, ScreenHeigth, false, 0, MangalaGame.Difficult.Hard, 6, 4); mangala.Closed += mangala_Closed; this.Components.Add(mangala); this.Components.Remove(mainMenu); mangala.Visible = true; }
void buttonStart_ClickUp(object sender, MouseEventHandler e) { Global.SoundClick.Play(Global.Sound, 1f, 0f); MangalaGame.Difficult diffEnum = MangalaGame.Difficult.Easy; int whichStart = 0; if (start.checkEasy.IsChecked) { diffEnum = MangalaGame.Difficult.Easy; } else if (start.checkNormal.IsChecked) { diffEnum = MangalaGame.Difficult.Normal; } else if (start.checkHard.IsChecked) { diffEnum = MangalaGame.Difficult.Hard; } if (start.checkR.IsChecked) { whichStart = 0; } else if (start.check1.IsChecked) { whichStart = 1; } else if (start.check2.IsChecked) { whichStart = 2; } if (start.checkOpen.IsChecked) { mangala = new MangalaGame(ScreenWidth, ScreenHeigth, !start.checkOne.IsChecked, whichStart, diffEnum, start.trackHole.Value + 4, start.trackStone.Value + 2); } else { mangala = new MangalaGame(ScreenWidth, ScreenHeigth, !start.checkOne.IsChecked, whichStart, diffEnum, 6, 4); } mangala.Closed += mangala_Closed; this.Components.Add(mangala); this.Components.Remove(start); mangala.Visible = true; }