Skip to content

Instantly share code, notes, and snippets.

@AlphaGit
Last active December 15, 2015 06:49
Show Gist options
  • Save AlphaGit/5218769 to your computer and use it in GitHub Desktop.
Save AlphaGit/5218769 to your computer and use it in GitHub Desktop.
// DrawableEntityBase
function DrawableEntityBase(drawingContext, color) {
if (!drawingContext) throw "A drawing context needs to be provided.";
this.ctx = drawingContext;
this.color = color;
this.draw = function() {
throw "DrawableEntityBase is an abstract class -- needs an implementation!"
};
return {
draw: this.draw
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment