Skip to content

Instantly share code, notes, and snippets.

@AdrienGiboire
Created October 27, 2011 14:15
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 AdrienGiboire/1319656 to your computer and use it in GitHub Desktop.
Save AdrienGiboire/1319656 to your computer and use it in GitHub Desktop.
function point() {
var p = {};
p.position = 0;
p.move = function (pixels) {
p.position += pixels;
};
p.up = function () { p.move(10); };
p.down = function () { p.move(-10); };
return p;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment