Malisa Huzaifa - Web Multimedia HTML6 Canvas & SVG

81 "black", 80, 75); }); }); var myGameArea = { canvas : document.createElement("canvas"), start : function() { this.canvas.width = 200; this.canvas.height = 270; this.context = this.canvas.getContext("2d"); document.body.insertBefore(this.canvas, document.body.childNodes[0]); this.interval = setInterval(updateGameArea, 20); }, stop : function() { clearInterval(this.interval); }, clear : function() { this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); } } function component(width, height, color, x, y, type) { this.type = type; this.width = width;

RkJQdWJsaXNoZXIy MTM3NDc5MQ==