public/js-roguelike-skeleton/src/valid-targets.js
function(target){
            var index = this.targets.indexOf(target);
            if(index !== -1){
                this.current = target;
                return true;
            }
            return false;
        }
function(target){
            var index = this.targets.indexOf(target);
            if(index !== -1){
                this.current = target;
                return true;
            }
            return false;
        }
function ( target ) { var index = this . targets . indexOf ( target ) ; if ( index !== - 1 ) { this . current = target ; return true ; } return false ; }
Sets the currently selected target object.
@method setCurrent
@param {Object} target
@return {Bool} If target was found in `this.targets`. (only set if found).
Sets the currently selected target object .