Skip to content

Commit

Permalink
enhancement(lint): Fix lint errors for projects/Turtle/MyProgram.java
Browse files Browse the repository at this point in the history
Co-authored-by: NeonGamerBot-QK <[email protected]>
Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
  • Loading branch information
zeon-neon[bot] and NeonGamerBot-QK authored Sep 25, 2024
1 parent e8265a3 commit 55f672b
Showing 1 changed file with 26 additions and 31 deletions.
57 changes: 26 additions & 31 deletions projects/Turtle/MyProgram.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@

import java.awt.Color;




public class MyProgram {

public static void main(String[] args) {
Expand All @@ -13,16 +9,16 @@ public static void main(String[] args) {
Turtle turtle = new Turtle();
turtle.penColor("red");
//draw your first initial
turtle.towards(10, 10);
turtle.backward(25);
turtle.right(90);
turtle.forward(25);
turtle.left(90);
turtle.forward(25);
turtle.right(90);
turtle.forward(25);
turtle.right(90);
turtle.forward(25);
turtle.towards(10, 10);
turtle.backward(25);
turtle.right(90);
turtle.forward(25);
turtle.left(90);
turtle.forward(25);
turtle.right(90);
turtle.forward(25);
turtle.right(90);
turtle.forward(25);

//draw a 5 pointed star
turtle.up();
Expand All @@ -31,10 +27,10 @@ public static void main(String[] args) {
turtle.down();
for (int i = 0; i < 5; i++) {
turtle.down();
turtle.setDirection(i * 144);
turtle.forward(50);
turtle.backward(50);
turtle.up();
turtle.setDirection(i * 144);
turtle.forward(50);
turtle.backward(50);
turtle.up();
}
//draw a flower
turtle.home();
Expand All @@ -44,19 +40,18 @@ public static void main(String[] args) {
turtle.down();
turtle.forward(50);
int tilt = 0;
for (int i = 0; i < 36; i++) {
turtle.penColor(Color.GREEN);
turtle.forward(50);
turtle.backward(50);
turtle.right(10);
tilt += 10;
}
turtle.right(180);
turtle.shapeSize(50, 50);
turtle.penColor(Color.darkGray);
turtle.forward(100);

for (int i = 0; i < 36; i++) {
turtle.penColor(Color.GREEN);
turtle.forward(50);
turtle.backward(50);
turtle.right(10);
tilt += 10;
}
turtle.right(180);
turtle.shapeSize(50, 50);
turtle.penColor(Color.darkGray);
turtle.forward(100);
//Create something colorful

}
}

0 comments on commit 55f672b

Please sign in to comment.