Exemple #1
0
        public MainWindow()
        {
            InitializeComponent();
            ExitLabel.Visibility = Visibility.Hidden;
            welcome = new Properties.Welcome();
            welcome.Show();
            this.Hide();
            theTimer.Interval  = TimeSpan.FromMilliseconds(10);
            theTimer.Tick     += dispatcherTimer_Tick;
            theTimer.IsEnabled = true;
            theBall            = new Ball(ball);
            board   = new TheBoard(paddle);
            bricks  = new List <Brick>();
            theGame = new Game(board, theBall, bricks);
            double pad = canvas.ActualHeight - (paddle.ActualHeight + 20);

            Canvas.SetBottom(paddle, pad);
            //makes bricks
            makeBricks(16, 4);
        }
Exemple #2
0
 public Game(TheBoard board, Ball ball, List <Brick> list)
 {
     this.bricks = list;
     this.ball   = ball;
     this.board  = board;
 }