Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();
            int[][,] styles = { new int[2, 2] {
                                    { 1, 1 }, { 1, 1 }
                                },         new int[1, 4]{
                                    { 1,         1, 1, 1 }
                                },         new int[2, 3]{
                                    { 0,0, 1 }, { 1, 1, 1 }
                                },         new int[2, 3]{
                                    { 1,0, 0 }, { 1, 1, 1 }
                                },         new int[2, 3]{
                                    { 0,1, 0 }, { 1, 1, 1 }
                                } };

            var game = new TetrisGame(Square.Styles(styles), new TimerEngine());

            game.AddDisplay(this);
            _controller = new Controller();
            game.SetController(_controller);
            game.Start();
        }