|
1 | 1 | package org.teachingkidsprogramming.section04mastery; |
2 | 2 |
|
| 3 | +import java.awt.Color; |
| 4 | + |
| 5 | +import org.teachingextensions.logo.utils.ColorUtils.ColorWheel; |
| 6 | +import org.teachingextensions.logo.utils.ColorUtils.PenColors; |
| 7 | + |
3 | 8 | public class DigiFlower |
4 | 9 | { |
5 | 10 | public static void main(String[] args) |
6 | 11 | { |
7 | 12 | // Show the tortoise --#1 |
8 | 13 | // Make the tortoise move as fast as possible --#7 |
9 | 14 | // Make the background silver --#8 |
10 | | - // Make the line the tortoise draws 3 pixels wide --#20 |
| 15 | + // Make the line the tortoise draws 3 pixels wide --#15 |
11 | 16 | // createColorPalette (recipe below) --#9.1 |
12 | | - // Do the following 15 times --#19.1 |
| 17 | + // Do the following 15 times --#13.1 |
13 | 18 | // drawOctogon (recipe below) --#10.1 |
14 | | - // Turn the tortoise 1/15th of 360 degrees to the right --#18 |
15 | | - // Repeat --#19.2 |
| 19 | + // Turn the tortoise 1/15th of 360 degrees to the right --#12 |
| 20 | + // Repeat --#14.2 |
16 | 21 | // ------------- Recipe for createColorPalette --#9.2 |
17 | | - // Pen Color 1 is red --#3 |
18 | | - // Pen Color 2 is dark orange --#11 |
19 | | - // Pen Color 3 is gold --#12 |
20 | | - // Pen Color 4 is yellow --#13 |
21 | | - // |
22 | | - // Add color 1 to the color wheel --#3.1 |
23 | | - // Add color 2 to the color wheel --#11.1 |
24 | | - // Add color 3 to the color wheel --#12.1 |
25 | | - // Add color 4 to the color wheel --#13.1 |
26 | | - // Add color 4 to the color wheel --#14 |
27 | | - // Add color 3 to the color wheel --#15 |
28 | | - // Add color 2 to the color wheel --#16 |
29 | | - // Add color 1 to the color wheel --#17 |
| 22 | + Color color1 = PenColors.Reds.Red; |
| 23 | + Color color2 = PenColors.Oranges.DarkOrange; |
| 24 | + Color color3 = PenColors.Yellows.Gold; |
| 25 | + Color color4 = PenColors.Yellows.Yellow; |
| 26 | + ColorWheel.addColor(color1); |
| 27 | + ColorWheel.addColor(color2); |
| 28 | + ColorWheel.addColor(color3); |
| 29 | + ColorWheel.addColor(color4); |
| 30 | + ColorWheel.addColor(color4); |
| 31 | + ColorWheel.addColor(color3); |
| 32 | + ColorWheel.addColor(color2); |
| 33 | + ColorWheel.addColor(color1); |
30 | 34 | // ------------- End of createColorPalette recipe --#9.3 |
31 | 35 | // |
32 | 36 | // ------------- Recipe for drawOctogon --#10.2 |
|
0 commit comments