Skip to content

Commit d827256

Browse files
committed
moved MakeALogo to Course01 w/@dcoopersmith
1 parent 2fa490c commit d827256

7 files changed

Lines changed: 49 additions & 16 deletions

File tree

LICENSE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ and limitations under the License.
2323
* Katrina Owen
2424
* June Clarke
2525
* David Coopersmith
26-
* 8th Grade students from PALM STEM Academy - Moreno Valley, CA
26+
* Edgar Melendrez
27+
* Alex Puente
28+
* 8th Grade students from PALM STEM Academy - Moreno Valley, CA - class of 2015-2016

src/main/java/org/teachingextensions/logo/utils/TKPLogoUtils/TKPLogo.java

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
import org.teachingextensions.logo.Tortoise;
44
import org.teachingextensions.logo.utils.ColorUtils.ColorWheel;
55
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
6-
import org.teachingkidsprogramming.recipes.completed.section00demos.MakeALogo;
6+
import org.teachingkidsprogramming.recipes.completed.section01forloops.MakeALogo;
77

8+
/**
9+
* <img src="https://avatars0.githubusercontent.com/u/4691010?v=3&s=200" style="text-align: left" alt="The TKP logo" height="50"><br/>
10+
* The TKPLogo allows you to create a TKP logo
11+
*/
812
public class TKPLogo
913
{
14+
/**
15+
* Sets up the Colors on the Color Wheel
16+
* <div><b>Example:</b> {@code TKPLogo.setupColorWheel();}</div>
17+
*/
1018
public static void setupColorWheel()
1119
{
1220
ColorWheel.addColor(PenColors.Grays.Gray);
@@ -22,6 +30,10 @@ public static void setupColorWheel()
2230
Tortoise.getBackgroundWindow().setBackground(ColorWheel.getRandomColorFromWheel());
2331
Tortoise.setPenWidth(4);
2432
}
33+
/**
34+
* Draws an TKP inner P
35+
* <div><b>Example:</b> {@code TKPLogo.draw_inner_tkp_P();}</div>
36+
*/
2537
public static void draw_inner_tkp_P()
2638
{
2739
Tortoise.setX(MakeALogo.XValue + 355);
@@ -35,6 +47,10 @@ public static void draw_inner_tkp_P()
3547
Tortoise.hide();
3648
Tortoise.turn(1);
3749
}
50+
/**
51+
* Draws an TKP outer P
52+
* <div><b>Example:</b> {@code TKPLogo.draw_outer_tkp_P();}</div>
53+
*/
3854
public static void draw_outer_tkp_P()
3955
{
4056
Tortoise.setAngle(180);
@@ -63,6 +79,10 @@ public static void draw_outer_tkp_P()
6379
Tortoise.turn(90);
6480
Tortoise.move(43);
6581
}
82+
/**
83+
* Draws an TKP right bracket
84+
* <div><b>Example:</b> {@code TKPLogo.drawRightBracket();}</div>
85+
*/
6686
public static void drawRightBracket()
6787
{
6888
Tortoise.setAngle(-90);
@@ -97,6 +117,10 @@ public static void drawRightBracket()
97117
Tortoise.turn(-90);
98118
Tortoise.move(11);
99119
}
120+
/**
121+
* Draws an TKP left bracket
122+
* <div><b>Example:</b> {@code TKPLogo.drawLeftBracket();}</div>
123+
*/
100124
public static void drawLeftBracket()
101125
{
102126
Tortoise.setAngle(-90);
@@ -130,6 +154,10 @@ public static void drawLeftBracket()
130154
Tortoise.turn(90);
131155
Tortoise.move(10);
132156
}
157+
/**
158+
* Draws an TKP T
159+
* <div><b>Example:</b> {@code TKPLogo.draw_tkp_T();}</div>
160+
*/
133161
public static void draw_tkp_T()
134162
{
135163
Tortoise.setX(MakeALogo.XValue);
@@ -166,7 +194,7 @@ public static void draw_tkp_T()
166194
Tortoise.turn(90);
167195
Tortoise.move(50);
168196
}
169-
public static void curve6()
197+
private static void curve6()
170198
{
171199
for (int i = 0; i < 180; i++)
172200
{
@@ -175,7 +203,7 @@ public static void curve6()
175203
Tortoise.move(size);
176204
}
177205
}
178-
public static void curve5()
206+
private static void curve5()
179207
{
180208
for (int i = 0; i < 180; i++)
181209
{
@@ -186,7 +214,7 @@ public static void curve5()
186214
Tortoise.move(size);
187215
}
188216
}
189-
public static void curve4()
217+
private static void curve4()
190218
{
191219
for (int i = 0; i < 90; i++)
192220
{
@@ -195,7 +223,7 @@ public static void curve4()
195223
Tortoise.move(size);
196224
}
197225
}
198-
public static void curve2()
226+
private static void curve2()
199227
{
200228
for (int i = 0; i < 90; i++)
201229
{
@@ -204,7 +232,7 @@ public static void curve2()
204232
Tortoise.move(size);
205233
}
206234
}
207-
public static void curve1()
235+
private static void curve1()
208236
{
209237
for (int i = 0; i < 90; i++)
210238
{
@@ -213,7 +241,7 @@ public static void curve1()
213241
Tortoise.move(size);
214242
}
215243
}
216-
public static void curve3()
244+
private static void curve3()
217245
{
218246
for (int i = 0; i < 90; i++)
219247
{
@@ -222,6 +250,10 @@ public static void curve3()
222250
Tortoise.move(size);
223251
}
224252
}
253+
/**
254+
* Draws an TKP K
255+
* <div><b>Example:</b> {@code TKPLogo.draw_tkp_K();}</div>
256+
*/
225257
public static void draw_tkp_K()
226258
{
227259
Tortoise.setAngle(180);

src/main/java/org/teachingkidsprogramming/recipes/completed/section01forloops/DoubleLoop.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static void main(String[] args)
5353
// Do the following 5 times --#12.1
5454
for (int i = 0; i < 5; i++)
5555
{
56-
// Change the pen color of the line the tortoise draws to black --#14
56+
// Change the pen color of the line the tortoise draws to black --#14
5757
Tortoise.setPenColor(PenColors.Grays.Black);
5858
// Move the Tortoise 25 pixels --#11
5959
Tortoise.move(25);

src/main/java/org/teachingkidsprogramming/recipes/completed/section00demos/MakeALogo.java renamed to src/main/java/org/teachingkidsprogramming/recipes/completed/section01forloops/MakeALogo.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
package org.teachingkidsprogramming.recipes.completed.section00demos;
1+
package org.teachingkidsprogramming.recipes.completed.section01forloops;
22

33
import org.teachingextensions.logo.Tortoise;
44
import org.teachingextensions.logo.utils.TKPLogoUtils.TKPLogo;
55

66
public class MakeALogo
7-
87
{
98
public static int YValue = 300;
109
public static int XValue = 100;
@@ -26,7 +25,7 @@ public static void main(String[] args)
2625
TKPLogo.drawRightBracket();
2726
// Draw an outer TKP 'P' --#6
2827
TKPLogo.draw_outer_tkp_P();
29-
// Call the make_Inner_P() method --#7
28+
// Draw an inner TKP 'P' --#7
3029
TKPLogo.draw_inner_tkp_P();
3130
}
3231
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section01forloops/Spiral.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static void main(String[] args)
1313
Tortoise.show();
1414
// Make the tortoise go as fast as possible --#4
1515
Tortoise.setSpeed(10);
16-
// Add Blue Violet to the Color Wheel --#7
16+
// Add Blue Violet to the Color Wheel --#7 HINT: Use the ColorWheel object
1717
ColorWheel.addColor(PenColors.Purples.BlueViolet);
1818
// Add Violet to the Color Wheel --#8
1919
ColorWheel.addColor(PenColors.Purples.Violet);

src/main/java/org/teachingkidsprogramming/section00demos/MakeALogo.java renamed to src/main/java/org/teachingkidsprogramming/section01forloops/MakeALogo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.teachingkidsprogramming.section00demos;
1+
package org.teachingkidsprogramming.section01forloops;
22

33
public class MakeALogo
44
{
@@ -14,6 +14,6 @@ public static void main(String[] args)
1414
// Draw a TKP 'K' --#5
1515
// Draw a right bracket --#9
1616
// Draw an outer TKP 'P' --#6
17-
// Call the make_Inner_P() method --#7
17+
// Draw an inner TKP 'P' --#7
1818
}
1919
}

src/main/java/org/teachingkidsprogramming/section01forloops/Spiral.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static void main(String[] args)
88
{
99
// Show the tortoise --#1
1010
// Make the tortoise go as fast as possible --#4
11-
// Add Blue Violet to the Color Wheel --#7
11+
// Add Blue Violet to the Color Wheel --#7 HINT: Use the TKPLogo object
1212
// Add Violet to the Color Wheel --#8
1313
// Add Purple to the Color Wheel --#9
1414
// Do the following 75 times --#3.1

0 commit comments

Comments
 (0)