예제 #1
0
 internal BoardManager(bool[][] gameBoard, Block activeBlock, GameStats gameStats, IBoardEventHandler eventHandler = null)
 {
     GameBoard    = gameBoard;
     m_Rows       = gameBoard.GetLength(0);
     ActiveBlock  = activeBlock;
     m_Columns    = gameBoard[0].Length;
     GameStats    = gameStats;
     EventHandler = eventHandler;
 }
예제 #2
0
        //////////////////////////////////////////////////////////////////////////
        public GameManager(int height, int width, IBoardEventHandler eventHandler = null,
                           IBlockProvider blockProvider = null)
        {
            var gameBoard = new bool[height][];

            for (var i = 0; i < height; i++)
            {
                gameBoard[i] = new bool[width];
            }

            boardManager  = new BoardManager(gameBoard, null, new GameStats(), eventHandler);
            BlockProvider = blockProvider;
        }