function Bob(canvas) { this.canvas = $(canvas); this.colour = new Colr(); var w = canvas.width(); var h = canvas.height(); this.x = Math.random() * w; this.y = Math.random() * h; } Bob.prototype.draw = function() {}; Bob.prototype.move = function() {}; Bob.prototype.toString = function() { return "Bob {x: " + this.x + ", y:" + this.y + ", colour:" + this.colour.css() + "}"; }