|
1428 | 1428 | * // Assign the frog variable a new Frog object.
|
1429 | 1429 | * fifi = new Frog(50, 50, 20);
|
1430 | 1430 | *
|
1431 |
| - * describe('A frog face drawn on a gray background.'); |
| 1431 | + * describe('A frog face drawn on a blue background.'); |
1432 | 1432 | * }
|
1433 | 1433 | *
|
1434 | 1434 | * function draw() {
|
|
1467 | 1467 | * frog1 = new Frog(25, 50, 10);
|
1468 | 1468 | * frog2 = new Frog(75, 50, 20);
|
1469 | 1469 | *
|
1470 |
| - * describe('Two frog faces drawn next to each other on a gray background.'); |
| 1470 | + * describe('Two frog faces drawn next to each other on a blue background.'); |
1471 | 1471 | * }
|
1472 | 1472 | *
|
1473 | 1473 | * function draw() {
|
|
1510 | 1510 | * // Slow the frame rate.
|
1511 | 1511 | * frameRate(1);
|
1512 | 1512 | *
|
1513 |
| - * describe('Two frog faces on a gray background. The frogs hop around randomly.'); |
| 1513 | + * describe('Two frog faces on a blue background. The frogs hop around randomly.'); |
1514 | 1514 | * }
|
1515 | 1515 | *
|
1516 | 1516 | * function draw() {
|
|
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 | *
|
|
1630 | 1590 | * frameRate(1);
|
1631 | 1591 | *
|
1632 | 1592 | * describe(
|
1633 |
| - * 'Five frog faces on a gray background. The frogs hop around randomly.' |
| 1593 | + * 'Five frog faces on a blue background. The frogs hop around randomly.' |
1634 | 1594 | * );
|
1635 | 1595 | * }
|
1636 | 1596 | *
|
|
0 commit comments