public/js-roguelike-skeleton/src/array-2d.js
function(width, height) {
            this.width = width;
            this.height = height;
            for (var i = 0; i < this.width; i++) {
                if(!this.data){
                    this.data = [];
                }

                if(this.data[i] === void 0){
                    this.data[i] = [];
                }
            }
        }
function(width, height) {
            this.width = width;
            this.height = height;
            for (var i = 0; i < this.width; i++) {
                if(!this.data){
                    this.data = [];
                }

                if(this.data[i] === void 0){
                    this.data[i] = [];
                }
            }
        }
function ( width , height ) { this . width = width ; this . height = height ; for ( var i = 0 ; i < this . width ; i ++ ) { if ( ! this . data ) { this . data = [ ] ; } if ( this . data [ i ] === void 0 ) { this . data [ i ] = [ ] ; } } }
Updates the size of this Array2d without destroying data.
@method setSize
@param {Number} width - The new width.
@param {Number} height - The new height.
Updates the size of this Array2d without destroying data .