From 6e063b9e9493195a32138130f899cc8369bdc6d4 Mon Sep 17 00:00:00 2001 From: Henry Hutchings Date: Wed, 3 Dec 2025 16:51:13 -0800 Subject: [PATCH 1/2] Just a diamond because I'm lazy --- lec40_git/Diamond.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lec40_git/Diamond.java diff --git a/lec40_git/Diamond.java b/lec40_git/Diamond.java new file mode 100644 index 0000000..7258d16 --- /dev/null +++ b/lec40_git/Diamond.java @@ -0,0 +1,16 @@ +import java.awt.Color; + +// This acts as the "default" shape so the screen isn't empty. +public class Diamond implements PartyShape { + + public void draw(Turtle t) { + t.setColor(Color.GREEN); + // Draw a square using primitive turtle moves + for (int i = 0; i < 2; i++) { + t.forward(60); + t.turnRight(110); + t.forward(60); + t.turnRight(70); + } + } +} \ No newline at end of file From 96aa03c90d848f1de8a141c68430a9a8234db4b6 Mon Sep 17 00:00:00 2001 From: Henry Hutchings Date: Wed, 3 Dec 2025 16:55:21 -0800 Subject: [PATCH 2/2] Just a diamond because I'm lazy --- lec40_git/Diamond.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lec40_git/Diamond.java b/lec40_git/Diamond.java index 7258d16..3edffe0 100644 --- a/lec40_git/Diamond.java +++ b/lec40_git/Diamond.java @@ -1,11 +1,9 @@ import java.awt.Color; -// This acts as the "default" shape so the screen isn't empty. public class Diamond implements PartyShape { - public void draw(Turtle t) { t.setColor(Color.GREEN); - // Draw a square using primitive turtle moves + // Draw a diamond using primitive turtle moves for (int i = 0; i < 2; i++) { t.forward(60); t.turnRight(110);