File tree Expand file tree Collapse file tree
src/main/java/org/teachingkidsprogramming
recipes/completed/section09final Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package org .teachingkidsprogramming .recipes .completed .section09final ;
2+
3+ import org .teachingextensions .logo .Tortoise ;
4+ import org .teachingextensions .logo .utils .ColorUtils .PenColors ;
5+
6+ public class WheelKata
7+ {
8+ public static void main (String [] args )
9+ {
10+ setUpTheDrawing ();
11+ for (int i = 0 ; i < 20 ; i ++)
12+ {
13+ drawTwoSides ();
14+ Tortoise .move (150 );
15+ Tortoise .turn (90 );
16+ }
17+ Tortoise .move (2 );
18+ }
19+ private static void setUpTheDrawing ()
20+ {
21+ Tortoise .show ();
22+ Tortoise .setSpeed (10 );
23+ Tortoise .setY (175 );
24+ Tortoise .setPenColor (PenColors .Blues .Blue );
25+ Tortoise .setPenWidth (5 );
26+ }
27+ private static void drawTwoSides ()
28+ {
29+ for (int i = 0 ; i < 2 ; i ++)
30+ {
31+ drawASide ();
32+ }
33+ }
34+ private static void drawASide ()
35+ {
36+ Tortoise .move (150 );
37+ Tortoise .turn (125 );
38+ }
39+ }
Original file line number Diff line number Diff line change @@ -4,8 +4,9 @@ public class RectangleKata
44{
55 public static void main (String [] args )
66 {
7- // Draw a rectangle
8- // HINT: Write each step in English FIRST, then translate to Java one line at a time
9- // TIP: Be sure to run after each line of Java to make sure it works as expected
7+ // Draw a rectangle
8+ // Write the steps to code your rectangle out in English
9+ // Translate from English to Java one line at a time
10+ // Run your code after each line of Java to make sure it works as expected
1011 }
1112}
Original file line number Diff line number Diff line change 1+ package org .teachingkidsprogramming .section09final ;
2+
3+ public class WheelKata
4+ {
5+ // Draw a wheel
6+ // Write the steps to code your wheel out in English
7+ // Translate from English to Java one line at a time
8+ // Run your code after each line of Java to make sure it works as expected
9+ }
You can’t perform that action at this time.
0 commit comments