Exemplo n.º 1
0
        public SinglePlayerView(int n)
        {
            this.n = n;
            InitializeComponent();
            Pause_QuitButton.Click += Pause_QuitButton_Click;

            myPanel.Children.Add(new GameBoardLeftAccessoriesView());
            myPanel.Children.Add(new MainGameBoardView());
            myPanel.Children.Add(new GameBoardRightAccessoriesView());

            Application.Current.MainWindow.KeyDown += MainWindow_KeyDown;

            player = new HumanPlayer();
            manager = null;
        }
Exemplo n.º 2
0
        public GameBoardManager(int n, GamePlayer player )
        {
            this.player = player;

            // rule compliant board size
            int width = n * 2 + n / 2;
            int height = width * 2 + n / 2;

            WallKickStrategy wallKickStrategy = new WallKickStrategy();
            wallKickStrategy.getStrategyCopy(20, 0, false); // precompute

            PolyominoDealer pieceDealer = new PolyominoDealer( n );

            this.Data = new GameBoardData(new HashSet<Mino>(), null, new Vector2(0,0), n, width, height, wallKickStrategy, pieceDealer);
            FrameNumber = 0;
            FrameRate = 32;
        }