Skip to content

Commit b84a1d8

Browse files
committed
updated DigiFlower w/@kimschmidtsbrain
1 parent 4879e79 commit b84a1d8

2 files changed

Lines changed: 21 additions & 17 deletions

File tree

0 Bytes
Binary file not shown.

TeachingKidsProgramming/src/org/teachingkidsprogramming/section04mastery/DigiFlower.java

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,36 @@
11
package org.teachingkidsprogramming.section04mastery;
22

3+
import java.awt.Color;
4+
5+
import org.teachingextensions.logo.utils.ColorUtils.ColorWheel;
6+
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
7+
38
public class DigiFlower
49
{
510
public static void main(String[] args)
611
{
712
// Show the tortoise --#1
813
// Make the tortoise move as fast as possible --#7
914
// 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
1116
// createColorPalette (recipe below) --#9.1
12-
// Do the following 15 times --#19.1
17+
// Do the following 15 times --#13.1
1318
// 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
1621
// ------------- 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);
3034
// ------------- End of createColorPalette recipe --#9.3
3135
//
3236
// ------------- Recipe for drawOctogon --#10.2

0 commit comments

Comments
 (0)