Skip to content

Commit 0f36117

Browse files
committed
formatting English
1 parent a26da6b commit 0f36117

File tree

14 files changed

+186
-161
lines changed

14 files changed

+186
-161
lines changed

src/org/teachingkidsprogramming/section01forloops/Spiral.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ public static void main(String[] args)
99
// Add Blue Violet to the Color Wheel (HINT: Use PenColors)--#7
1010
// Add Violet to the Color Wheel --#8
1111
// Add Purple to the Color Wheel --#9
12-
// Do the following 75 times --#3
12+
// Do the following 75 times --#3.1
1313
// Change the pen color of the line the tortoise draws the next color on the Color Wheel --#6
1414
// Move the tortoise 5 times the current line number you are drawing --#5
1515
// Turn the tortoise 1/3 of 360 degrees to the right --#2
16-
// Repeat --#3
16+
// Repeat --#3.2
1717
}
1818
}

src/org/teachingkidsprogramming/section02methods/FourSquare.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ public static void main(String[] args)
66
{
77
// Show the tortoise --#1
88
// Make the tortoise move as fast as possible --#7
9-
// Do the following 4 times --#8
10-
// drawSquare (recipe below) --#6
11-
// ------------- Recipe for drawSquare --#6
12-
// Do the following 4 times --#5
9+
// Do the following 4 times --#8.1
10+
// drawSquare (recipe below) --#6.1
11+
// ------------- Recipe for drawSquare --#6.2
12+
// Do the following 4 times --#5.1
1313
// Change the pen color of the line the tortoise draws to a random color --#3
1414
// Move the tortoise 50 pixels --#2
1515
// Turn the tortoise 90 degrees to the right --#4
16-
// Repeat --#5
17-
// ------------- End of drawSquare recipe --#6
16+
// Repeat --#5.2
17+
// ------------- End of drawSquare recipe --#6.3
1818
// Turn the tortoise 90 degrees to the right --#9
19-
// Repeat --#8
19+
// Repeat --#8.2
2020
}
2121
// Related Videos:
2222
// Sub recipe-> Method : http://youtu.be/C6fnqjceVcs

src/org/teachingkidsprogramming/section02methods/Houses.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ public static void main(String[] args)
77
// Make the tortoise move as fast as possible --#11
88
// Have the tortoise start at 200 pixels in on the X axis --#14
99
// The current height is 40 --#1.2
10-
// drawHouse (recipe below) --#9
11-
// ------------- Recipe for drawHouse --#9
12-
// Change the pen color of the line the tortoise draws to lightGray --#15
13-
// Move the tortoise the height of a house --#1.1
14-
// Turn the tortoise 90 degrees to the right --#2
15-
// Move the tortoise 30 pixels --#3
16-
// Turn the tortoise 90 degrees to the right --#4
17-
// Move the tortoise the height of a house --#5
18-
// Turn the tortoise 90 degrees to the left --#6
19-
// Move the tortoise 20 pixels --#7
20-
// Turn the tortoise 90 degrees to the left --#8
21-
// ------------- End of drawHouse recipe --#9
10+
// drawHouse (recipe below) --#9.1
11+
// ------------- Recipe for drawHouse --#9.2
12+
// Change the pen color of the line the tortoise draws to lightGray --#15
13+
// Move the tortoise the height of a house --#1.1
14+
// Turn the tortoise 90 degrees to the right --#2
15+
// Move the tortoise 30 pixels --#3
16+
// Turn the tortoise 90 degrees to the right --#4
17+
// Move the tortoise the height of a house --#5
18+
// Turn the tortoise 90 degrees to the left --#6
19+
// Move the tortoise 20 pixels --#7
20+
// Turn the tortoise 90 degrees to the left --#8
21+
// ------------- End of drawHouse recipe --#9.3
2222
// drawHouse with height 120 (recipe below) --#10
2323
// drawHouse with height 90 (recipe below) --#12
2424
// drawHouse with height 20 (recipe below) --#13

src/org/teachingkidsprogramming/section02methods/TriangleShell.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ public class TriangleShell
66
public static void main(String[] args)
77
{
88
// Show the tortoise --#1
9-
// Make the tortoise go as fast as possible --#7
10-
// Do the following 60 times --#8.1
11-
// Change the pen color of the line the tortoise draws to a random color --#10
12-
// Increase the current length of the side by 4 pixels --#9
9+
// Make the tortoise go as fast as possible --#6
10+
// Do the following 60 times --#7.1
11+
// Change the pen color of the line the tortoise draws to a random color --#9
12+
// Increase the current length of the side by 4 pixels --#8
1313
//
14-
// drawTriangle (recipe below) --#6
15-
// ------------- Recipe for drawTriangle --#5
14+
// drawTriangle (recipe below) --#5.1
15+
// ------------- Recipe for drawTriangle --#5.2
1616
// Do the following 3 times --#3.1
1717
// Move the tortoise the current length of a side --#4
1818
// Turn the tortoise 1/3rd of 360 degrees --#2
1919
// Repeat --#3.2
20-
// ------------- End of drawTriangle recipe --#5
20+
// ------------- End of drawTriangle recipe --#5.3
2121
//
22-
// Turn the tortoise 1/60th of 360 degrees to the right --#11
23-
// Repeat --#8.2
22+
// Turn the tortoise 1/60th of 360 degrees to the right --#10
23+
// Repeat --#7.2
2424
}
2525
// Related Videos:
2626
// Sub recipe-> Method : http://youtu.be/C6fnqjceVcs

src/org/teachingkidsprogramming/section04mastery/DigiFlower.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ public static void main(String[] args)
88
// Make the tortoise move as fast as possible --#7
99
// Make the background silver (HINT: Use PenColors) --#8
1010
// Make the line the tortoise draws 3 pixels wide --#20
11-
// createColorPalette (recipe below) --#9
12-
// Do the following 15 times --#19.1
13-
// drawOctogon (recipe below) --#10
14-
// Turn the tortoise 1/15th of 360 degrees to the right --#18
15-
// Repeat --#19.2
16-
// ------------- Recipe for createColorPalette --#9
11+
// createColorPalette (recipe below) --#9.1
12+
// Do the following 15 times --#19.1
13+
// drawOctogon (recipe below) --#10.1
14+
// Turn the tortoise 1/15th of 360 degrees to the right --#18
15+
// Repeat --#19.2
16+
// ------------- Recipe for createColorPalette --#9.2
1717
// Pen Color 1 is red --#3
1818
// Pen Color 2 is dark orange --#11
1919
// Pen Color 3 is gold --#12
@@ -27,11 +27,14 @@ public static void main(String[] args)
2727
// Add color 3 to the color wheel --#15
2828
// Add color 2 to the color wheel --#16
2929
// Add color 1 to the color wheel --#17
30-
// ------------- Recipe for drawOctogon --#10
30+
// ------------- End of createColorPalette recipe --#9.3
31+
//
32+
// ------------- Recipe for drawOctogon --#10.2
3133
// Do the following 8 times --#6.1
3234
// Change the pen color of the line the tortoise draws to the next color on the color wheel --#4
3335
// Move the tortoise 50 pixels --#2
3436
// Turn the tortoise 1/8th of 360 degrees to the right --#5
3537
// Repeat --#6.2
38+
// ------------- End of drawOctogon recipe --#10.3
3639
}
3740
}

src/org/teachingkidsprogramming/section04mastery/KnottedRing.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ public class KnottedRing
55
public static void main(String[] args)
66
{
77
// Make the tortoise move as fast as possible --#4
8-
// createColorPalette (recipe below) --#7
9-
// ------------- Recipe for createColorPalette (HINT: Use PenColors)--#7
8+
// createColorPalette (recipe below) --#7.1
9+
//
10+
// ------------- Recipe for createColorPalette (HINT: Use PenColors)--#7.2
1011
// Add hot pink to the color wheel --#6
1112
// Add red to the color wheel --#13
1213
// Add fuchsia to the color wheel --#14
@@ -15,19 +16,19 @@ public static void main(String[] args)
1516
// Add medium violet red to the color wheel --#17
1617
// Add crimson to the color wheel --#18
1718
// Add tomato to the color wheel --#19
18-
// ------------- End of createColorPalette recipe --#7
19-
// Do the following 30 times --#11
19+
// ------------- End of createColorPalette recipe --#7.3
20+
// Do the following 30 times --#11.1
2021
// Change the pen color of the line the tortoise draws to a random color from the color wheel --#5
2122
// drawOctagonWithOverlap (recipe below) --#9
22-
// ------------- Recipe for drawOctagonWithOverlap --#8
23-
// Do the following 8 + 1 times --#3
24-
// Move the tortoise 110 pixels --#1
25-
// Turn the tortoise 1/8th of 360 degrees to the right --#2
26-
// Repeat --#3
27-
// ------------- End of drawOctagonWithOverlap recipe --#8
23+
// ------------- Recipe for drawOctagonWithOverlap --#8.1
24+
// Do the following 8 + 1 times --#3.1
25+
// Move the tortoise 110 pixels --#1
26+
// Turn the tortoise 1/8th of 360 degrees to the right --#2
27+
// Repeat --#3.2
28+
// ------------- End of drawOctagonWithOverlap recipe --#8.2
2829
// Turn the tortoise 1/30th of 360 degrees to the right --#10
2930
// Turn the tortoise 5 more degrees to the right --#12
30-
// Repeat --#11
31+
// Repeat --#11.2
3132
}
3233
// Related Videos:
3334
// Sub recipe-> Method : http://youtu.be/C6fnqjceVcs

src/org/teachingkidsprogramming/section04mastery/PentagonCrazy.java

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,35 @@ public class PentagonCrazy
55
public static void main(String[] args)
66
{
77
// Make the tortoise move as fast as possible --#3
8-
// createColorPalette (recipe below) --#8
9-
// ------------- Recipe for createColorPalette (HINT: Use PenColors)--#8
8+
// createColorPalette (recipe below) --#8.1
9+
//
10+
// ------------- Recipe for createColorPalette (HINT: Use PenColors)--#8.2
1011
// Add steel blue to the color wheel --#7
1112
// Add dark orchid to the color wheel --#11
1213
// Add dark slate blue to the color wheel --#12
1314
// Add teal to the color wheel --#13
1415
// Add indigo to the color wheel --#14
15-
// ------------- End of createColorPalette recipe --#8
16-
// drawPentagon (recipe below) --#10
17-
// ------------- Recipe for drawPentagon --#10
18-
// Do the following 200 times --#2
19-
// adjustPen (recipe below) --#9
20-
// ------------- Recipe for adjustPen --#9
16+
// ------------- End of createColorPalette recipe --#8.3
17+
//
18+
// drawPentagon (recipe below) --#10.1
19+
//
20+
// ------------- Recipe for drawPentagon --#10.2
21+
// Do the following 200 times --#2.1
22+
// adjustPen (recipe below) --#9.1
23+
//
24+
// ------------- Recipe for adjustPen --#9.2
2125
// Change the pen color of the line the tortoise draws to the next color on the color wheel --#6
2226
// Increase the tortoises pen width by 1 --#15
2327
// If the tortoises pen width is greater than 4, then --#17
2428
// Reset it to 1 --#16
25-
// ------------- End of adjustPen recipe --#9
29+
// ------------- End of adjustPen recipe --#9.3
30+
//
2631
// The current length of a side is the same as the number of the side you are about to draw ( 1st side = 1 pixel, 2nd side = 2 pixels, etc) --#4.2
2732
// Move the tortoise the length of a side --#4.1
2833
// Turn the tortoise 1/5th of 360 degrees --#1
2934
// Turn the tortoise 1 more degree --#5
30-
// Repeat --#2
31-
// ------------- End of drawPentagon recipe --#10
35+
// Repeat --#2.2
36+
// ------------- End of drawPentagon recipe --#10.3
3237
}
3338
// Related Videos:
3439
// Sub recipe-> Method : http://youtu.be/C6fnqjceVcs

src/org/teachingkidsprogramming/section05recursion/SpiderWeb.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@ public static void main(String[] args)
1111
// The current length of a line is 10.5 pixels --#1.2
1212
// The current zoom is 1.1 --#8.2
1313
// Do the following 10 times --#10
14-
// weaveOneLayer (recipe below) --#9
15-
// ------------- Recipe for weaveOneLayer --#9
16-
// Do the following 6 times --#5
17-
// drawTriangle (recipe below) --#4.2
18-
// ------------- Recipe for drawTriangle --#4
14+
// weaveOneLayer (recipe below) --#9.1
15+
//
16+
// ------------- Recipe for weaveOneLayer --#9.2
17+
// Do the following 6 times --#5.1
18+
// drawTriangle (recipe below) --#4.1
19+
//
20+
// ------------- Recipe for drawTriangle --#4.2
1921
// Do the following 3 times --#3
2022
// Move the tortoise the length of a line --#1.1
2123
// Turn the tortoise 1/3rd of 360 degrees --#2
2224
// Repeat
23-
// ------------- End of drawTriangle recipe --#4
25+
// ------------- End of drawTriangle recipe --#4.3
26+
//
2427
// Turn the tortoise 1/6th of 360 degrees to the right --#7
2528
// Increase the length of the line by the current zoom --#8.1
26-
// Repeat
27-
// ------------- End of weaveOneLayer recipe --#9
29+
// Repeat --#5.2
30+
// ------------- End of weaveOneLayer recipe --#9.2
31+
//
2832
// Change the zoom so it is multiplied by 1.3 --#11
2933
// Repeat
3034
}

src/org/teachingkidsprogramming/section05recursion/TurtleTree.java

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,38 @@ public static void main(String[] args)
77
// Make the tortoise go as fast as possible --#10
88
// Turn the background black (HINT: Use PenColors) --#21
99
// The current branch length = 60 --#1.2
10-
// drawBranch(recipe below) --#2
11-
// ------------- Recipe for drawBranch --#2
10+
// drawBranch(recipe below) --#2.1
11+
//
12+
// ------------- Recipe for drawBranch --#2.2
1213
// If the current branch length is greater than zero, do the rest of this recipe --#5
13-
// adjustColor --#15
14-
// ------------- Recipe for adjustColor --#15
14+
// adjustColor (recipe below)--#15.1
15+
// ------------- Recipe for adjustColor --#15.2
1516
// A 10 pixel long branch is lime --#20
1617
// A 20 pixel long branch is forest green --#19
1718
// A 30 pixel long branch is dark green --#18
1819
// A 40 pixel long branch is olive --#17
1920
// A 50 pixel long branch is sienna --#14
2021
// A 60 pixel long branch is saddle brown --#13
21-
// ------------- End of adjustColor --#15
22+
// ------------- End of adjustColor --#15.3
23+
//
2224
// Move the tortoise the length of the current branch --#1.1
23-
// drawLowerBranches (recipe below) --#6
24-
// ------------- Recipe for drawLowerBranches --#6
25+
// drawLowerBranches (recipe below) --#6.1
26+
//
27+
// ------------- Recipe for drawLowerBranches --#6.2
2528
// Turn the Tortoise 30 degrees to the right --#3
26-
// drawShorterBranch (recipe below) --#8
27-
// ------------- Recipe for drawShorterBranch --#8
29+
// drawShorterBranch (recipe below) --#8.1
30+
//
31+
// ------------- Recipe for drawShorterBranch --#8.2
2832
// drawBranch (10 pixels shorter) --#4
29-
// ------------- End of drawShorterBranch recipe --#8
33+
// ------------- End of drawShorterBranch recipe --#8.3
34+
//
3035
// Turn the Tortoise 60 degrees to the left --#7
3136
// drawShorterBranch --#9
3237
// Turn the Tortoise 30 degrees to the right --#12
3338
// adjustColor --#16
3439
// Move the tortoise backward the length of the current branch --#11
35-
// ------------- End of drawLowerBranches recipe --#6
36-
// ------------- End of drawBranch recipe --#2
40+
// ------------- End of drawLowerBranches recipe --#6.3
41+
//
42+
// ------------- End of drawBranch recipe --#2.3
3743
}
3844
}

src/org/teachingkidsprogramming/section07events/ConnectTheDots.java

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,51 @@ public class ConnectTheDots implements MouseRightClickListener, MouseLeftClickLi
77
{
88
public static void main(String[] args)
99
{
10-
//Create a new 'Connect The Dots' object. --#1.1
10+
// Create a new 'Connect The Dots' object. --#1.1
1111
}
1212
public ConnectTheDots()
1313
{
14-
// Listen for right clicks on the window for the tortoise --#20.2
15-
// Listen for left clicks on the window for the tortoise --#1.2
16-
//Make the Tortoise go as fast as possible. --#4
17-
// clearTheScreen (recipe below) --#19
18-
// ------------- Recipe for clearTheScreen --#19
19-
// Clear the Tortoise --#20.1
20-
// Write "Right click to clear" on the screen at position 100, 100 --#18
21-
// ------------- End of clearTheScreen Recipe --#19
22-
// prepareColorPalette (recipe below) --#17
23-
// ------------- Recipe for prepareColorPalette (HINT: use PenColors)--#17
24-
// Add red to the color wheel --#6
25-
// Add green to the color wheel --#12
26-
// Add blue to the color wheel --#13
27-
// Add purple to the color wheel --#14
28-
// Add pink to the color wheel --#15
29-
// Add teal to the color wheel --#16
30-
// ------------- End of prepareColorPalette Recipe --#17
14+
// Listen for right clicks on the window for the tortoise --#20.2
15+
// Listen for left clicks on the window for the tortoise --#1.2
16+
// Make the Tortoise go as fast as possible. --#4
17+
// clearTheScreen (recipe below) --#19.1
18+
//
19+
// ------------- Recipe for clearTheScreen --#19.2
20+
// Clear the Tortoise --#20.1
21+
// Write "Right click to clear" on the screen at position 100, 100 --#18
22+
// ------------- End of clearTheScreen Recipe --#19.3
23+
//
24+
// prepareColorPalette (recipe below) --#17.1
25+
// ------------- Recipe for prepareColorPalette (HINT: use PenColors)--#17.2
26+
// Add red to the color wheel --#6
27+
// Add green to the color wheel --#12
28+
// Add blue to the color wheel --#13
29+
// Add purple to the color wheel --#14
30+
// Add pink to the color wheel --#15
31+
// Add teal to the color wheel --#16
32+
// ------------- End of prepareColorPalette Recipe --#17.3
3133
}
3234
@Override
3335
public void onRightMouseClick(int x, int y)
3436
{
35-
// clearTheScreen (recipe below) --#20.3
37+
// clearTheScreen (recipe above) --#20.3
3638
}
3739
@Override
3840
public void onLeftMouseClick(int x, int y)
3941
{
40-
// addDot (recipe below) --#11
41-
// ------------- Recipe for addDot --#11
42-
// addACircle (recipe below) --#10
43-
// ------------- Recipe for addACircle --#10
44-
// Create a circle with a radius of 7 which is the same color as the next color on the colorwheel --#5
45-
// Change the circle to be 40% opaque --#9
46-
// Move the circle so that it's center is at the current position of the mouse --#8
47-
//Place the circle on the tortoise's window. --#7
48-
// ------------- End of addACircle Recipe --#10
49-
// Move the tortoise to the current position of the mouse --#2
50-
// ------------- End of addDot Recipe --#11
42+
// addDot (recipe below) --#11.1
43+
//
44+
// ------------- Recipe for addDot --#11.2
45+
// addACircle (recipe below) --#10.1
46+
//
47+
// ------------- Recipe for addACircle --#10.2
48+
// Create a circle with a radius of 7 which is the same color as the next color on the colorwheel --#5
49+
// Change the circle to be 40% opaque --#9
50+
// Move the circle so that it's center is at the current position of the mouse --#8
51+
// Place the circle on the tortoise's window. --#7
52+
// ------------- End of addACircle Recipe --#10.3
53+
//
54+
// Move the tortoise to the current position of the mouse --#2
55+
// ------------- End of addDot Recipe --#11.3
5156
}
5257
}

0 commit comments

Comments
 (0)