Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Square() {
- let a = Math.floor(Math.random() * 501);
- let b = Math.floor(Math.random() * 501);
- let d = Math.floor(Math.random() * 101);
- this.x = a;
- this.y = b;
- this.d = d;
- this.draw = function(c) {
- c.fillStyle = "red";
- c.fillRect(this.x, this.y, this.d, this.d);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement