Grid constructor
Grid(
- dynamic width,
- dynamic height, [
- dynamic matrix
Implementation
Grid(width, height, [matrix]) {
/**
* The number of columns of the grid.
* @type number
*/
this.width = width;
/**
* The number of rows of the grid.
* @type number
*/
this.height = height;
/**
* A 2D array of nodes.
*/
this.nodes = _buildNodes(width, height, matrix);
}