static void Main(string[] args) { Player Player1 = new Player(); Player Player2 = new Player(); Game game = new Game(); game.Round = 1; Player1.Name = AskName.Name(); Console.WriteLine(); Player2.Name = AskName.Name();; Console.Clear(); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); Start.StartGame(Player1, Player2, game); }
public void AddComparison() { AskName popup = new AskName(); popup.ShowDialog(); string name = popup.Name; if (name == "Best Run" || name == "Top Scores" || name == "Sum of Best" || name == "General" || name == "File Sync" || name == "" || popup.WasCanceled) { return; } file.AddNewItem(name, "Scoreset Type", "Comparison"); foreach (string key in file.GetSection("Best Run").Keys) { if (key == "Scoreset Type") { continue; } file.AddNewItem(name, key, "0"); } selector.Reload(); selector.Index = selector.GetIndexOfComparison(name); }
void RestartButton_Click(object sender, EventArgs e) { matched = 0; timePassed = 0; NameBox.Text = ""; StartTimer.Start(); NameBox.Hide(); AskName.Hide(); DisplayVictory.Hide(); SubmitButton.Hide(); Deck deck = new Deck(); PictureBox[] boxes = new PictureBox[] { pictureBox1, pictureBox2, pictureBox3, pictureBox4, pictureBox5, pictureBox6, pictureBox7, pictureBox8, pictureBox9, pictureBox10, pictureBox11, pictureBox12, pictureBox13, pictureBox14, pictureBox15, pictureBox16 }; totalCards = boxes.Count(); foreach (PictureBox pictureBox in boxes) { Card card = deck.Deal(); pictureBox.Image = card.CurrentImage; pictureBox.Tag = card; pictureBox.Show(); } }
// Use this for initialization void Start() { //add eventListener that changes when playerName changes AskName askName = FindObjectOfType <AskName>(); Text textBox = GetComponent <Text>(); textBox.text = askName.playerName; }
private void GameEnd() { StartTimer.Stop(); NameBox.Show(); AskName.Show(); DisplayVictory.Show(); SubmitButton.Show(); }
public GameForm() { InitializeComponent(); Deck deck = new Deck(); boxes = new PictureBox[] { pictureBox1, pictureBox2, pictureBox3, pictureBox4, pictureBox5, pictureBox6, pictureBox7, pictureBox8, pictureBox9, pictureBox10, pictureBox11, pictureBox12, pictureBox13, pictureBox14, pictureBox15, pictureBox16 }; StartTimer.Start(); totalCards = boxes.Count(); NameBox.Hide(); AskName.Hide(); DisplayVictory.Hide(); SubmitButton.Hide(); foreach (PictureBox pictureBox in boxes) { Card card = deck.Deal(); pictureBox.Image = card.CurrentImage; pictureBox.Tag = card; } }
void OnMouseDown() { AskName.ActivateMenu(); }