File tree Expand file tree Collapse file tree 1 file changed +0
-40
lines changed Expand file tree Collapse file tree 1 file changed +0
-40
lines changed Original file line number Diff line number Diff line change 1566
1566
*
1567
1567
* <div>
1568
1568
* <code>
1569
- * // Declare two frog variables.
1570
- * let frog1;
1571
- * let frog2;
1572
- *
1573
- * function setup() {
1574
- * createCanvas(100, 100);
1575
- *
1576
- * // Assign the frog variables a new Frog object.
1577
- * frog1 = new Frog(25, 50, 10);
1578
- * frog2 = new Frog(75, 50, 20);
1579
- *
1580
- * describe('Two frog faces drawn next to each other on a gray background.');
1581
- * }
1582
- *
1583
- * function draw() {
1584
- * background('cornflowerblue');
1585
- *
1586
- * // Show the frogs.
1587
- * frog1.show();
1588
- * frog2.show();
1589
- * }
1590
- *
1591
- * class Frog {
1592
- * constructor(x, y, size) {
1593
- * this.x = x;
1594
- * this.y = y;
1595
- * this.size = size;
1596
- * }
1597
- *
1598
- * show() {
1599
- * textAlign(CENTER, CENTER);
1600
- * textSize(this.size);
1601
- * text('🐸', this.x, this.y);
1602
- * }
1603
- * }
1604
- * </code>
1605
- * </div>
1606
- *
1607
- * <div>
1608
- * <code>
1609
1569
* // Create an array that will hold frogs.
1610
1570
* let frogs = [];
1611
1571
*
You can’t perform that action at this time.
0 commit comments