public/js-roguelike-skeleton/src/array-2d.js
function(){
            var newArray = new Array2d(this.width, this.height);
            for(var x = this.width - 1; x >= 0; x--){
                for(var y = this.height - 1; y >= 0; y--){
                    var val = this.get(x, y);
                    if(val !== void 0){
                        newArray.set(x, y, val);
                    }
                }
            }
            return newArray;
        }
function(){
            var newArray = new Array2d(this.width, this.height);
            for(var x = this.width - 1; x >= 0; x--){
                for(var y = this.height - 1; y >= 0; y--){
                    var val = this.get(x, y);
                    if(val !== void 0){
                        newArray.set(x, y, val);
                    }
                }
            }
            return newArray;
        }
function ( ) { var newArray = new Array2d ( this . width , this . height ) ; for ( var x = this . width - 1 ; x >= 0 ; x -- ) { for ( var y = this . height - 1 ; y >= 0 ; y -- ) { var val = this . get ( x , y ) ; if ( val !== void 0 ) { newArray . set ( x , y , val ) ; } } } return newArray ; }
Creates a copy of this Array2d. Shallow copies values.
@method copy
@return {Array2d}
Creates a copy of this Array2d . Shallow copies values .