Skip to content

Commit 4a8d30f

Browse files
committed
Cleaned section 7 turtle recipes with @mballin
1 parent 6be03ae commit 4a8d30f

7 files changed

Lines changed: 33 additions & 33 deletions

File tree

src/main/java/org/teachingkidsprogramming/recipes/completed/section03ifs/ChooseYourOwnAdventure.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private static void startStory()
2020
String action = askAQuestion("Do you want to 'wake up' or 'explore' the dream?");
2121
if ("wake up".equalsIgnoreCase(action))
2222
{
23-
tellMoreStory("You wake up and have a boring day. The End.");
23+
tellMoreStory("You wake up and have a boring day. The end.");
2424
}
2525
else if ("explore".equalsIgnoreCase(action))
2626
{
@@ -33,12 +33,12 @@ else if ("explore".equalsIgnoreCase(action))
3333
}
3434
private static void endStory()
3535
{
36-
tellMoreStory("You don't know how to read directions. You can't play this game. The End.");
36+
tellMoreStory("You don't know how to read directions. You can't play this game. The end.");
3737
}
3838
private static void approachOoze()
3939
{
4040
tellMoreStory(
41-
"You approach a glowing, green bucket of ooze, worried that you will get in trouble, you pick up the bucket.");
41+
"You approach a glowing, green bucket of ooze. Worried that you will get in trouble, you pick up the bucket.");
4242
String pourTo = askAQuestion(" Do you want to pour the ooze into the 'backyard' or 'toilet'?");
4343
if ("toilet".equalsIgnoreCase(pourTo))
4444
{
@@ -56,15 +56,15 @@ else if ("backyard".equalsIgnoreCase(pourTo))
5656
private static void pourIntoToilet()
5757
{
5858
tellMoreStory(
59-
"As you pour the ooze into the toilet it backs up, gurgles and explodes covering you in radio-active waste.");
59+
"As you pour the ooze into the toilet it backs up, gurgles, and explodes, covering you in radioactive waste.");
6060
String pourTo = askAQuestion("Do you want to train to be a NINJA? 'Yes' or 'HECK YES'?");
6161
if ("yes".equalsIgnoreCase(pourTo))
6262
{
63-
tellMoreStory("Awesome Dude! You live out the rest of your life fighting crimes and eating pizza!");
63+
tellMoreStory("Awesome dude! You live out the rest of your life fighting crimes and eating pizza!");
6464
}
6565
else if ("heck yes".equalsIgnoreCase(pourTo))
6666
{
67-
tellMoreStory("Awesome Dude! You live out the rest of your life fighting crimes and eating pizza!");
67+
tellMoreStory("Awesome dude! You live out the rest of your life fighting crimes and eating pizza!");
6868
}
6969
else
7070
{
@@ -75,10 +75,10 @@ private static void pourIntoBackyard()
7575
{
7676
tellMoreStory(
7777
"As you walk into the backyard a net scoops you up and a giant takes you to a boiling pot of water.");
78-
String action = askAQuestion("As the man starts to prepare you as soup, do you... 'Scream' or 'Faint'?");
78+
String action = askAQuestion("As the man starts to prepare you as soup, do you...'Scream' or 'Faint'?");
7979
if ("faint".equalsIgnoreCase(action))
8080
{
81-
tellMoreStory("You made a delicious soup! Yum! The End.");
81+
tellMoreStory("You made a delicious soup! Yum! The end.");
8282
}
8383
else if ("scream".equalsIgnoreCase(action))
8484
{

src/main/java/org/teachingkidsprogramming/recipes/completed/section07objects/MyTurtles.java renamed to src/main/java/org/teachingkidsprogramming/recipes/completed/section07objects/CloneTurtles.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
88
import org.teachingextensions.logo.utils.LineAndShapeUtils.Text;
99

10-
public class MyTurtles
10+
public class CloneTurtles
1111
{
1212
//Uncomment the two lines of code below to create a container and a window for your turtles --#1
1313
public ArrayList<Turtle> turtles = new ArrayList<Turtle>();
1414
public MultiTurtleWindow mtw = new MultiTurtleWindow();
1515
//
16-
public MyTurtles()
16+
public CloneTurtles()
1717
{
1818
showSomeTurtles();
1919
}
@@ -66,6 +66,6 @@ private void showSomeTurtles()
6666
//
6767
public static void main(String[] args)
6868
{
69-
new MyTurtles();
69+
new CloneTurtles();
7070
}
7171
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section07objects/TurtleObjects.java renamed to src/main/java/org/teachingkidsprogramming/recipes/completed/section07objects/SuperTurtles.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import org.teachingextensions.WindowUtils.MultiTurtleWindow;
44
import org.teachingextensions.logo.Turtle;
55

6-
public class TurtleObjects
6+
public class SuperTurtles
77
{
88
public MultiTurtleWindow mtw = new MultiTurtleWindow();
9-
public TurtleObjects()
9+
public SuperTurtles()
1010
{
1111
showSomeTurtles();
1212
}
1313
public static void main(String[] args)
1414
{
15-
new TurtleObjects();
15+
new SuperTurtles();
1616
}
1717
private void showSomeTurtles()
1818
{

src/main/java/org/teachingkidsprogramming/recipes/completed/section07objects/TortoiseMobile.java renamed to src/main/java/org/teachingkidsprogramming/recipes/completed/section08events/TortoiseMaze.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.teachingkidsprogramming.recipes.completed.section07objects;
1+
package org.teachingkidsprogramming.recipes.completed.section08events;
22

33
import java.awt.Color;
44
import java.awt.event.ActionEvent;
@@ -15,13 +15,13 @@
1515

1616
@SuppressWarnings("unused")
1717
//***********************In Progress***************************//
18-
public class TortoiseMobile implements MouseRightClickListener
18+
public class TortoiseMaze implements MouseRightClickListener
1919
{
2020
public static void main(String[] args)
2121
{
22-
new TortoiseMobile();
22+
new TortoiseMaze();
2323
}
24-
public TortoiseMobile()
24+
public TortoiseMaze()
2525
{
2626
Tortoise.getBackgroundWindow().addMouseRightClickListener(this);
2727
Tortoise.setSpeed(10);

src/main/java/org/teachingkidsprogramming/section03ifs/ChooseYourOwnAdventure.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,34 @@ private static void startStory()
2222
{
2323
// wakeUp (recipe below) --#2.1
2424
// ------------- Recipe for wakeUp --#2.2
25-
// Tell the user "You wake up and have a boring day. The End." --#1
25+
// Tell the user "You wake up and have a boring day. The end." --#1
2626
// ------------- End of wakeUp recipe --#2.3
2727
}
2828
else if ("explore".equalsIgnoreCase(action))
2929
{
3030
// approachOoze (recipe below) --#4.1
3131
// ------------- Recipe for approachOoze --#4.2
32-
// Tell the user "You approach a glowing, green bucket of ooze, worried that you will get in trouble, you pick up the bucket." --#3
32+
// Tell the user "You approach a glowing, green bucket of ooze. Worried that you will get in trouble, you pick up the bucket." --#3
3333
// Ask the user "Do you want to pour the ooze into the 'backyard' or 'toilet'?" --#7
3434
// If they answer "toilet" --#8.1
3535
// pourIntoToilet (recipe below) --#12.1
3636
// ------------- Recipe for pourIntoToilet --#12.2
37-
// Tell the user "As you pour the ooze into the toilet it backs up, gurgles and explodes covering you in radio-active waste." --#10
37+
// Tell the user "As you pour the ooze into the toilet it backs up, gurgles, and explodes, covering you in radioactive waste." --#10
3838
// Ask the user "Do you want to train to be a NINJA? 'Yes' or 'HECK YES'?" --#11
3939
// If they answer "yes" --#13.1
40-
// Tell the user "Awesome Dude! You live out the rest of your life fighting crimes and eating pizza!" --#14
40+
// Tell the user "Awesome dude! You live out the rest of your life fighting crimes and eating pizza!" --#14
4141
// Otherwise, if they answer "heck yes" --#13.2
42-
// Tell the user "Awesome Dude! You live out the rest of your life fighting crimes and eating pizza!" --#15
42+
// Tell the user "Awesome dude! You live out the rest of your life fighting crimes and eating pizza!" --#15
4343
// Otherwise, if they answer anything else --#13.3
4444
// endStory --#16
4545
// ------------- End of pourIntoToilet recipe --#12.3
4646
// Otherwise, if they answer "backyard" --#8.2
4747
// pourIntoBackyard (recipe below) --#19.1
4848
// ------------- Recipe for pourIntoBackyard --#19.2
4949
// Tell the user "As you walk into the backyard a net scoops you up and a giant takes you to a boiling pot of water." --#17
50-
// Ask the user "As the man starts to prepare you as soup, do you... 'Scream' or 'Faint'?" --#18
50+
// Ask the user "As the man starts to prepare you as soup, do you...'Scream' or 'Faint'?" --#18
5151
// If they answer "faint" --#20.1
52-
// Tell the user "You made a delicious soup! Yum! The End." --#21
52+
// Tell the user "You made a delicious soup! Yum! The end." --#21
5353
// Otherwise, if they answer "scream" --#20.2
5454
// startStory --#22
5555
// Otherwise, if they answer anything else --#20.3
@@ -63,7 +63,7 @@ else if ("explore".equalsIgnoreCase(action))
6363
{
6464
// endStory (recipe below) --#6.1
6565
// ------------- Recipe for endStory --#6.2
66-
// Tell the user "You don't know how to read directions. You can't play this game. The End." --#5
66+
// Tell the user "You don't know how to read directions. You can't play this game. The end." --#5
6767
// ------------- End of endStory recipe --#6.3
6868
}
6969
}

src/main/java/org/teachingkidsprogramming/section07objects/MyTurtles.java renamed to src/main/java/org/teachingkidsprogramming/section07objects/CloneTurtles.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package org.teachingkidsprogramming.section07objects;
22

3-
public class MyTurtles
3+
public class CloneTurtles
44
{
55
// Uncomment the two lines of code below to create a container and a window for your turtles --#1
66
// public ArrayList<Turtle> turtles = new ArrayList<Turtle>();
77
// public MultiTurtleWindow mtw = new MultiTurtleWindow();
88
//
9-
public MyTurtles()
9+
public CloneTurtles()
1010
{
1111
showSomeTurtles();
1212
}
@@ -40,6 +40,6 @@ private void showSomeTurtles()
4040
//
4141
public static void main(String[] args)
4242
{
43-
new MyTurtles();
43+
new CloneTurtles();
4444
}
4545
}

src/main/java/org/teachingkidsprogramming/section07objects/TurtleObjects.java renamed to src/main/java/org/teachingkidsprogramming/section07objects/SuperTurtles.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
import org.teachingextensions.WindowUtils.MultiTurtleWindow;
44

5-
public class TurtleObjects
5+
public class SuperTurtles
66
{
77
public MultiTurtleWindow mtw = new MultiTurtleWindow();
8-
public TurtleObjects()
8+
public SuperTurtles()
99
{
1010
showSomeTurtles();
1111
}
1212
public static void main(String[] args)
1313
{
14-
new TurtleObjects();
14+
new SuperTurtles();
1515
}
1616
private void showSomeTurtles()
1717
{
@@ -27,7 +27,7 @@ private void showSomeTurtles()
2727
// Create a new slowTurtle instance
2828
// Add your slowTurtle to your MultiTurtleWindow
2929
// Have your slowTurtle draw a upside down triangle with 50 pixel sides
30-
// ------------- End of makeSlowTurtle --#2.2
30+
// ------------- End of makeSlowTurtle --#3.1
3131
// makeCrazyTurtle (recipe below) --#6.0
3232
// ------------- Recipe for makeCrazyTurtle --#5.1
3333
// Create a new crazyTurtle instance

0 commit comments

Comments
 (0)