Skip to content

Instantly share code, notes, and snippets.

Created August 17, 2013 22:26
Show Gist options
  • Save anonymous/6258993 to your computer and use it in GitHub Desktop.
Save anonymous/6258993 to your computer and use it in GitHub Desktop.
object oriented grid spaces
var gridSpace = function (height) {
this.height = height;
}
gridSpace.prototype = {
compareTo: function (height) {
if (this.height > height) return 1;
if (this.height < height) return -1;
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment