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; }
////////////////////////////////////////////////////////////////////////// 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; }