Skip to content

Commit f3a757c

Browse files
committed
updates from @jamesrcounts
1 parent 40a790a commit f3a757c

6 files changed

Lines changed: 59 additions & 65 deletions

File tree

16.5 KB
Binary file not shown.

TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/graders/QuizUtils.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
package org.teachingkidsprogramming.recipes.quizzes.graders;
22

3-
import java.awt.Color;
4-
import java.awt.Font;
5-
import java.awt.Graphics2D;
6-
import java.awt.RenderingHints;
7-
83
import org.teachingextensions.logo.Tortoise;
94
import org.teachingextensions.logo.Turtle;
10-
import org.teachingextensions.logo.utils.TortoiseUtils;
115
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
126
import org.teachingextensions.logo.utils.LineAndShapeUtils.Paintable;
7+
import org.teachingextensions.logo.utils.TortoiseUtils;
8+
9+
import java.awt.*;
1310

1411
public class QuizUtils
1512
{
@@ -52,7 +49,7 @@ public static void prepareScoringScreen(boolean[] answers, Paintable paintable,
5249
TortoiseUtils.resetTurtle();
5350
Tortoise.setSpeed(turtleSpeed);
5451
Tortoise.getBackgroundWindow().setColor(Color.black);
55-
Tortoise.getBackgroundWindow().addPaintable(paintable);
52+
Tortoise.getBackgroundWindow().getWindow().addPaintable(paintable);
5653
Tortoise.show();
5754
}
5855
public static Turtle createTestTurtle()

TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/graders/SimpleBubbleQuizGrader.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package org.teachingkidsprogramming.recipes.quizzes.graders;
22

3-
import java.awt.Graphics2D;
4-
5-
import javax.swing.JPanel;
6-
73
import org.teachingextensions.logo.Tortoise;
84
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
95
import org.teachingextensions.logo.utils.LineAndShapeUtils.Paintable;
106
import org.teachingextensions.logo.utils.LineAndShapeUtils.Text;
117

8+
import javax.swing.*;
9+
import java.awt.*;
10+
1211
public class SimpleBubbleQuizGrader implements Paintable
1312
{
1413
private boolean[] answers = new boolean[4];
@@ -35,7 +34,7 @@ public void paint(Graphics2D g, JPanel caller)
3534
{
3635
this.answers[0] = quiz.leftClickWiredUp;
3736
this.answers[2] = quiz.rightClickWiredUp;
38-
for (Paintable p : Tortoise.getBackgroundWindow().additional)
37+
for (Paintable p : Tortoise.getBackgroundWindow().getAdditional())
3938
{
4039
try
4140
{

TeachingKidsProgramming/src/org/teachingkidsprogramming/section05recursion/DeepDive05Recursion.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
package org.teachingkidsprogramming.section05recursion;
22

3-
import java.awt.Color;
4-
import java.awt.Cursor;
5-
import java.util.Arrays;
6-
import java.util.HashMap;
7-
import java.util.List;
8-
93
import org.junit.Assert;
104
import org.junit.Test;
115
import org.teachingextensions.logo.Tortoise;
126
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
137

8+
import java.awt.*;
9+
import java.util.Arrays;
10+
import java.util.HashMap;
11+
import java.util.List;
12+
1413
public class DeepDive05Recursion
1514
{
1615
// Step 1: SELECT the method name (changeThePointerToAHand on line 27), then click the Run Button
@@ -19,9 +18,9 @@ public class DeepDive05Recursion
1918
// Step 3: FILL IN the blank (___) to make that method pass
2019
// Step 4: SAY at least one thing you just learned
2120
// Step 5: GO to the next method
22-
//
21+
//
2322
// NOTE: Do not change anything except the blank (___)
24-
//
23+
//
2524
@Test
2625
public void changeThePointerToAHand() throws Exception
2726
{
@@ -107,16 +106,16 @@ public void putAFiftyCentPieceFirst() throws Exception
107106
}
108107
/**
109108
* Ignore the following, It's needed to run the deep dive
110-
*
111-
*
112-
*
113-
*
114-
*
115-
*
116-
*
117-
*
118-
*
119-
*
109+
*
110+
*
111+
*
112+
*
113+
*
114+
*
115+
*
116+
*
117+
*
118+
*
120119
*/
121120
public boolean _____ = false;
122121
public boolean ______ = true;
@@ -129,7 +128,7 @@ public String ___()
129128
}
130129
private Cursor getCursor()
131130
{
132-
Cursor cursor = Tortoise.getBackgroundWindow().getCursor();
131+
Cursor cursor = Tortoise.getBackgroundWindow().getWindow().getCursor();
133132
return cursor;
134133
}
135134
}

TeachingKidsProgramming/src/org/teachingkidsprogramming/section06modelviewcontroller/DeepDive06ModelViewController.java

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

3-
import java.awt.Color;
4-
import java.awt.Cursor;
5-
import java.util.HashMap;
6-
73
import org.junit.Assert;
84
import org.junit.Test;
95
import org.teachingextensions.logo.Tortoise;
106

7+
import java.awt.*;
8+
import java.util.HashMap;
9+
1110
@SuppressWarnings("unused")
1211
public class DeepDive06ModelViewController
1312
{
@@ -17,9 +16,9 @@ public class DeepDive06ModelViewController
1716
// Step 3: FILL IN the blank (___) to make that method pass
1817
// Step 4: SAY at least one thing you just learned
1918
// Step 5: GO to the next method
20-
//
19+
//
2120
// NOTE: Do not change anything except the blank (___)
22-
//
21+
//
2322
@Test
2423
public void stringsCanBeArrays() throws Exception
2524
{
@@ -114,16 +113,16 @@ public void inYourOwnWords() throws Exception
114113
}
115114
/**
116115
* Ignore the following, It's needed to run the deep dive
117-
*
118-
*
119-
*
120-
*
121-
*
122-
*
123-
*
124-
*
125-
*
126-
*
116+
*
117+
*
118+
*
119+
*
120+
*
121+
*
122+
*
123+
*
124+
*
125+
*
127126
*/
128127
public boolean _____ = false;
129128
public boolean ______ = true;
@@ -137,7 +136,7 @@ public String ___()
137136
}
138137
private Cursor getCursor()
139138
{
140-
Cursor cursor = Tortoise.getBackgroundWindow().getCursor();
139+
Cursor cursor = Tortoise.getBackgroundWindow().getWindow().getCursor();
141140
return cursor;
142141
}
143142
}

TeachingKidsProgramming/src/org/teachingkidsprogramming/section07objects/DeepDive07Objects.java

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

3-
import java.awt.Cursor;
4-
53
import org.junit.Assert;
64
import org.junit.Test;
75
import org.teachingextensions.logo.Tortoise;
@@ -10,6 +8,8 @@
108
import org.teachingextensions.logo.utils.PizzaUtils.Pizza;
119
import org.teachingextensions.logo.utils.PizzaUtils.Topping;
1210

11+
import java.awt.*;
12+
1313
@SuppressWarnings("unused")
1414
public class DeepDive07Objects
1515
{
@@ -19,9 +19,9 @@ public class DeepDive07Objects
1919
// Step 3: FILL IN the blank (___) to make that method pass
2020
// Step 4: SAY at least one thing you just learned
2121
// Step 5: GO to the next method
22-
//
22+
//
2323
// NOTE: Do not change anything except the blank (___)
24-
//
24+
//
2525
@Test
2626
public void twoTortoises() throws Exception
2727
{
@@ -47,7 +47,7 @@ public void twoTortoisesYetAgain() throws Exception
4747
boolean result = michelangelo.equals(anonymousNinja);
4848
Assert.assertEquals(true, result);
4949
}
50-
//Turtle Leonardo belongs to "this"
50+
//Turtle Leonardo belongs to "this"
5151
private Turtle leonardo;
5252
@Test
5353
public void fatTrailTurtle() throws Exception
@@ -57,7 +57,7 @@ public void fatTrailTurtle() throws Exception
5757
ninja.setPenWidth(30);
5858
Assert.assertEquals(30, this.leonardo.getPenWidth());
5959
}
60-
//Turtle Donatello belongs to "this"
60+
//Turtle Donatello belongs to "this"
6161
private Turtle donatello;
6262
@Test
6363
public void explodingTurtle() throws Exception
@@ -132,16 +132,16 @@ public void feedAllTheNinjasAgain() throws Exception
132132
}
133133
/**
134134
* Ignore the following, It's needed to run the deep dive
135-
*
136-
*
137-
*
138-
*
139-
*
140-
*
141-
*
142-
*
143-
*
144-
*
135+
*
136+
*
137+
*
138+
*
139+
*
140+
*
141+
*
142+
*
143+
*
144+
*
145145
*/
146146
private Tortoise[] throwPizzaParty()
147147
{
@@ -166,7 +166,7 @@ public String ___()
166166
}
167167
private Cursor getCursor()
168168
{
169-
Cursor cursor = Tortoise.getBackgroundWindow().getCursor();
169+
Cursor cursor = Tortoise.getBackgroundWindow().getWindow().getCursor();
170170
return cursor;
171171
}
172172
public DeepDive07Objects()

0 commit comments

Comments
 (0)