Easiest way is to implement your findClosest wrapper on the RoomPostion prototype; something like this:
```javascript
RoomPosition.prototype.myGetClosest = function (targets) {
var me = this;
if (!targets.length) {
return null;
}
var mapToPos = _.map(targets, function(t) {
var pos = t.pos || t;
if (!(pos instanceof RoomPosition)) { //assume JSON pos
pos = new RoomPosition(pos.x, pos.y, pos.roomName);
}
return { original: t, range: me.getRangeTo(pos) };
});
return _.first(_.sortBy(mapToPos, "range")).original;
};