private void menuClicked(object sender, EventArgs e)
 {
     numScores.Inlines.Clear();
     numScores.Inlines.Add(new Bold(new Run("updated")));
     MessageBox.Show("Button Clicked");
     ScoreWindow window = new ScoreWindow();
     this.Visibility = Visibility.Collapsed;
     window.Show();
 }
        private void moveBall(Ellipse ball, double x, double y)
        {
            nextPosition.Y = y - ball.Height / 2;
            nextPosition.X = x - ball.Width / 2;

            foreach (Rectangle wall in walls)
                detectWall(ball, wall);

            Canvas.SetTop(ball, nextPosition.Y);
            Canvas.SetLeft(ball, nextPosition.X);

            if (isGoalReached(p1ball) && isGoalReached(p2ball))
            {
                goal.Fill = new SolidColorBrush(Colors.Green);
                timer.Stop();
                ScoreWindow scoreWindow;
                if(!scoreMenuOpened)
                {
                    scoreMenuOpened = true;
                    scoreWindow = new ScoreWindow(screenHeight,screenWidth,gameTime);
                    this.Visibility = Visibility.Collapsed;
                    scoreWindow.Show();
                }
            }
            else
                goal.Fill = new SolidColorBrush(Colors.Red);
        }