Skip to content

Commit 087d3cf

Browse files
committed
updated KnottedRing w/@samanthalangit
1 parent 55180e9 commit 087d3cf

2 files changed

Lines changed: 21 additions & 19 deletions

File tree

0 Bytes
Binary file not shown.
Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
11
package org.teachingkidsprogramming.section04mastery;
22

33
import org.teachingextensions.logo.Tortoise;
4+
import org.teachingextensions.logo.utils.ColorUtils.ColorWheel;
5+
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
46

57
public class KnottedRing
68
{
79
public static void main(String[] args)
810
{
911
Tortoise.show();
1012
// Make the tortoise move as fast as possible --#4
11-
// createColorPalette (recipe below) --#7.1
12-
//
13-
// ------------- Recipe for createColorPalette --#7.2
14-
// Add hot pink to the color wheel --#6
15-
// Add red to the color wheel --#13
16-
// Add fuchsia to the color wheel --#14
17-
// Add orange red to the color wheel --#15
18-
// Add deep pink to the color wheel --#16
19-
// Add medium violet red to the color wheel --#17
20-
// Add crimson to the color wheel --#18
21-
// Add tomato to the color wheel --#19
22-
// ------------- End of createColorPalette recipe --#7.3
23-
// Do the following 30 times --#11.1
13+
createColorPalette();
14+
// Do the following 30 times --#10.1
2415
// Change the pen color of the line the tortoise draws to the next color from the color wheel --#5
25-
// drawOctagonWithOverlap (recipe below) --#9
26-
// ------------- Recipe for drawOctagonWithOverlap --#8.1
16+
// drawOctagonWithOverlap (recipe below) --#8.0
17+
// ------------- Recipe for drawOctagonWithOverlap --#7.1
2718
// Do the following 8 + 1 times --#3.1
2819
// Move the tortoise 110 pixels --#1
2920
// Turn the tortoise 1/8th of 360 degrees to the right --#2
3021
// Repeat --#3.2
31-
// ------------- End of drawOctagonWithOverlap recipe --#8.2
32-
// Turn the tortoise 1/30th of 360 degrees to the right --#10
33-
// Turn the tortoise 5 more degrees to the right --#12
34-
// Repeat --#11.2
22+
// ------------- End of drawOctagonWithOverlap recipe --#7.2
23+
// Turn the tortoise 1/30th of 360 degrees to the right --#9
24+
// Turn the tortoise 5 more degrees to the right --#11
25+
// Repeat --#10.2
26+
}
27+
private static void createColorPalette()
28+
{
29+
ColorWheel.addColor(PenColors.Pinks.HotPink);
30+
ColorWheel.addColor(PenColors.Reds.Red);
31+
ColorWheel.addColor(PenColors.Pinks.Fuchsia);
32+
ColorWheel.addColor(PenColors.Reds.OrangeRed);
33+
ColorWheel.addColor(PenColors.Pinks.DeepPink);
34+
ColorWheel.addColor(PenColors.Reds.MediumVioletRed);
35+
ColorWheel.addColor(PenColors.Reds.Crimson);
36+
ColorWheel.addColor(PenColors.Reds.Tomato);
3537
}
3638
}

0 commit comments

Comments
 (0)