Skip to content

Commit 1aa5ed9

Browse files
committed
merge with upstream
2 parents 841d5e6 + 85b53ea commit 1aa5ed9

50 files changed

Lines changed: 605 additions & 473 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@
1010
settings.xml
1111
/.idea
1212
TeachingKidsProgramming.Source.Java.iml
13+
14+
*.orig

src/main/java/org/teachingextensions/logo/TurtlePanel.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ public synchronized Animals getAnimal()
8585
public synchronized void setAnimal(Animals animal)
8686
{
8787
this.animal = animal;
88-
URL resource = this.getClass().getClassLoader()
89-
.getResource("images/" + animal + ".png");
90-
image = new ImageIcon(resource).getImage();
88+
String name = "images/" + animal + ".png";
89+
URL resource = this.getClass().getClassLoader().getResource(name);
90+
if (resource == null) { throw new IllegalStateException("Could not find animal: " + name); }
91+
image = new ImageIcon(resource).getImage();
9192
}
9293
public void setCursor(int cursor)
9394
{

src/main/java/org/teachingkidsprogramming/recipes/quizzes/graders/QuizBuzzAdapter.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/main/java/org/teachingkidsprogramming/recipes/quizzes/graders/QuizBuzzGrader.java

Lines changed: 0 additions & 129 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ public static void main(String[] args)
99
// Add Blue Violet to the Color Wheel (HINT: Use PenColors)--#7
1010
// Add Violet to the Color Wheel --#8
1111
// Add Purple to the Color Wheel --#9
12-
// Do the following 75 times --#3
12+
// Do the following 75 times --#3.1
1313
// Change the pen color of the line the tortoise draws the next color on the Color Wheel --#6
1414
// Move the tortoise 5 times the current line number you are drawing --#5
1515
// Turn the tortoise 1/3 of 360 degrees to the right --#2
16-
// Repeat --#3
16+
// Repeat --#3.2
1717
}
1818
}

src/main/java/org/teachingkidsprogramming/section02methods/FourSquare.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ public static void main(String[] args)
66
{
77
// Show the tortoise --#1
88
// Make the tortoise move as fast as possible --#7
9-
// Do the following 4 times --#8
10-
// drawSquare (recipe below) --#6
11-
// ------------- Recipe for drawSquare --#6
12-
// Do the following 4 times --#5
9+
// Do the following 4 times --#8.1
10+
// drawSquare (recipe below) --#6.1
11+
// ------------- Recipe for drawSquare --#6.2
12+
// Do the following 4 times --#5.1
1313
// Change the pen color of the line the tortoise draws to a random color --#3
1414
// Move the tortoise 50 pixels --#2
1515
// Turn the tortoise 90 degrees to the right --#4
16-
// Repeat --#5
17-
// ------------- End of drawSquare recipe --#6
16+
// Repeat --#5.2
17+
// ------------- End of drawSquare recipe --#6.3
1818
// Turn the tortoise 90 degrees to the right --#9
19-
// Repeat --#8
19+
// Repeat --#8.2
2020
}
2121
// Related Videos:
2222
// Sub recipe-> Method : http://youtu.be/C6fnqjceVcs

src/main/java/org/teachingkidsprogramming/section02methods/Houses.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ public static void main(String[] args)
77
// Make the tortoise move as fast as possible --#11
88
// Have the tortoise start at 200 pixels in on the X axis --#14
99
// The current height is 40 --#1.2
10-
// drawHouse (recipe below) --#9
11-
// ------------- Recipe for drawHouse --#9
12-
// Change the pen color of the line the tortoise draws to lightGray --#15
13-
// Move the tortoise the height of a house --#1.1
14-
// Turn the tortoise 90 degrees to the right --#2
15-
// Move the tortoise 30 pixels --#3
16-
// Turn the tortoise 90 degrees to the right --#4
17-
// Move the tortoise the height of a house --#5
18-
// Turn the tortoise 90 degrees to the left --#6
19-
// Move the tortoise 20 pixels --#7
20-
// Turn the tortoise 90 degrees to the left --#8
21-
// ------------- End of drawHouse recipe --#9
10+
// drawHouse (recipe below) --#9.1
11+
// ------------- Recipe for drawHouse --#9.2
12+
// Change the pen color of the line the tortoise draws to lightGray --#15
13+
// Move the tortoise the height of a house --#1.1
14+
// Turn the tortoise 90 degrees to the right --#2
15+
// Move the tortoise 30 pixels --#3
16+
// Turn the tortoise 90 degrees to the right --#4
17+
// Move the tortoise the height of a house --#5
18+
// Turn the tortoise 90 degrees to the left --#6
19+
// Move the tortoise 20 pixels --#7
20+
// Turn the tortoise 90 degrees to the left --#8
21+
// ------------- End of drawHouse recipe --#9.3
2222
// drawHouse with height 120 (recipe below) --#10
2323
// drawHouse with height 90 (recipe below) --#12
2424
// drawHouse with height 20 (recipe below) --#13

src/main/java/org/teachingkidsprogramming/section02methods/TriangleShell.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ public class TriangleShell
66
public static void main(String[] args)
77
{
88
// Show the tortoise --#1
9-
// Make the tortoise go as fast as possible --#7
10-
// Do the following 60 times --#8.1
11-
// Change the pen color of the line the tortoise draws to a random color --#10
12-
// Increase the current length of the side by 4 pixels --#9
13-
// drawTriangle (recipe below) --#6
14-
// ------------- Recipe for drawTriangle --#5
9+
// Make the tortoise go as fast as possible --#6
10+
// Do the following 60 times --#7.1
11+
// Change the pen color of the line the tortoise draws to a random color --#9
12+
// Increase the current length of the side by 4 pixels --#8
13+
//
14+
// drawTriangle (recipe below) --#5.1
15+
// ------------- Recipe for drawTriangle --#5.2
1516
// Do the following 3 times --#3.1
1617
// Move the tortoise the current length of a side --#4
1718
// Turn the tortoise 1/3rd of 360 degrees --#2
1819
// Repeat --#3.2
19-
// ------------- End of drawTriangle recipe --#5
20-
// Turn the tortoise 1/60th of 360 degrees to the right --#11
21-
// Repeat --#8.2
20+
// ------------- End of drawTriangle recipe --#5.3
21+
//
22+
// Turn the tortoise 1/60th of 360 degrees to the right --#10
23+
// Repeat --#7.2
2224
}
2325
// Related Videos:
2426
// Sub recipe-> Method : http://youtu.be/C6fnqjceVcs

0 commit comments

Comments
 (0)