Exemplo n.º 1
0
        void game_Manager_update_data(object sender, EventArgs e)
        {
            Manager m = (Manager)sender;

            if (!m.is_game_over())
            {
                this.moves_label.Text = m.Get_Moves_Number().ToString();
                if (!m.Get_Is_Player1_Turn())   // if it
                {
                    player_1_label.BackColor = Color.DarkGoldenrod;
                    player_2_label.BackColor = Color.Transparent;
                }
                else
                {
                    player_2_label.BackColor = Color.DarkGoldenrod;
                    player_1_label.BackColor = Color.Transparent;
                }
            }
            else
            {
                string winner_Name;
                if (m.Own_Player_Number() == 1)
                {
                    winner_Name = player1_name;
                }
                else
                {
                    winner_Name = player2_name;
                }
                MessageBox.Show("The Winner is " + winner_Name + "\n\nCheck your score in Score board", "Game Over", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this.Hide();
                High_Score_Form high_score_start = new High_Score_Form(winner_Name);
                high_score_start.Show();
            }
        }
Exemplo n.º 2
0
        private void high_score_botton_Click(object sender, EventArgs e)
        {
            High_Score_Form high_score_start = new High_Score_Form();

            high_score_start.Show();
        }