Skip to content

Instantly share code, notes, and snippets.

@objectiveSee
Created May 22, 2013 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save objectiveSee/5629509 to your computer and use it in GitHub Desktop.
Save objectiveSee/5629509 to your computer and use it in GitHub Desktop.
Matchmaking.gameNear = function(user, location, callback) {
console.log('[DEBUG] [gameNear]');
Q.fcall(this.updateUserLocation.bind(this,user,location)) // TODO: why do we have to pass 'this' first in bind() params?
.then(this.findGamesNearby.bind(this,user,location))
.then(function(games_nearby) {
foo(games_nearby);
}).done();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment