//Check if two picks have the same TAG. public static bool Checkpic() { int[] Cards = CardList.SearchForPairs(); if (Cards[0] == Cards[1]) { return(true); } return(false); }
private void GameBoard_Load(object sender, EventArgs e) { if (SaveGameSettings.GameType == 0) { this.Text = "G3 Memory Game (Classic)"; } else { this.Text = "G3 Memory Game (Combo)"; } if (SaveGameSettings.sfx == true) { checkBoxSFX.Checked = true; } else { checkBoxSFX.Checked = false; } if (SaveGameSettings.music == true) { checkBoxMusic.Checked = true; WMPlayer.URL = (Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "GameBoardTheme.wma")); WMPlayer.Ctlcontrols.play(); } else { checkBoxMusic.Checked = false; WMPlayer.Ctlcontrols.stop(); } AIhard.RememberTag.list = new List <PlayCard>(); ThemeArrays.Create(); PlayCard[] CardArray = BoardGeneration.GenerateBoard(SaveGameSettings.Pairs * 2, splitContainer1); CardList.Create(CardArray); GameMaster.Start(this); // Background depending on chosen theme. if (SaveGameSettings.ThemeBg == 0) { splitContainer1.Panel1.BackgroundImage = Properties.Resources.bg_hi_tech_2; } else if (SaveGameSettings.ThemeBg == 1) { splitContainer1.Panel1.BackgroundImage = Properties.Resources.bg_myLittlePony; } else if (SaveGameSettings.ThemeBg == 2) { splitContainer1.Panel1.BackgroundImage = Properties.Resources.bg_worldmap_2; } // Show timer as "selected value" seconds, before countdown begins. timeLabel.Text = SaveGameSettings.Timer.ToString() + " seconds"; listView1.View = View.Details; listView1.Columns.Add("PLAYER", 150, HorizontalAlignment.Left); listView1.Columns.Add("SCORE", 80, HorizontalAlignment.Left); for (int i = 0; i < PlayerList.list.Count; i++) { listView1.Items.Add(PlayerList.list[i].Name.ToString()); listView1.Items[i].SubItems.Add(PlayerList.list[i].Score.ToString()); } }