Skip to content

Commit 1b3959a

Browse files
committed
Cleaned section 7 turtle with @mballin
1 parent d06eb01 commit 1b3959a

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

0 Bytes
Binary file not shown.

TeachingKidsProgramming/src/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
}

TeachingKidsProgramming/src/org/teachingkidsprogramming/section07objects/MyTurtles.java renamed to TeachingKidsProgramming/src/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
}

TeachingKidsProgramming/src/org/teachingkidsprogramming/section07objects/TurtleObjects.java renamed to TeachingKidsProgramming/src/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)