public/js-roguelike-skeleton/src/valid-targets-finder.js
function(){
            var tiles = this.getValidTargetTiles();
            var result = [];
            for (var i = 0; i < tiles.length; i++) {
                var tile = tiles[i];
                var targets = this.getValidTargetsAtPosition(tile.x, tile.y);
                result = result.concat(targets);
                if(this.includeTiles){
                    result.push(tile);
                }
            }
            return result;
        }
function(){
            var tiles = this.getValidTargetTiles();
            var result = [];
            for (var i = 0; i < tiles.length; i++) {
                var tile = tiles[i];
                var targets = this.getValidTargetsAtPosition(tile.x, tile.y);
                result = result.concat(targets);
                if(this.includeTiles){
                    result.push(tile);
                }
            }
            return result;
        }
function ( ) { var tiles = this . getValidTargetTiles ( ) ; var result = [ ] ; for ( var i = 0 ; i < tiles . length ; i ++ ) { var tile = tiles [ i ] ; var targets = this . getValidTargetsAtPosition ( tile . x , tile . y ) ; result = result . concat ( targets ) ; if ( this . includeTiles ) { result . push ( tile ) ; } } return result ; }
Gets all valid targets.
@method getValidTargets
@return {Array}
Gets all valid targets .