forked from League-Archive/IntroToJavaWorkshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTriangleShell.java
More file actions
executable file
·40 lines (21 loc) · 851 Bytes
/
TriangleShell.java
File metadata and controls
executable file
·40 lines (21 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package section2;
import org.jointheleague.graphical.robot.Robot;
public class TriangleShell {
// 1. Create a new Robot
void go() {
drawTriangle(100); // 3. delete this line (used only for testing)
// 6. Make the robot go as fast as possible
// 4. make a variable to hold the length of the triangle and set it to 50
// 7. Use a for loop to repeat steps #9 to #10, 60 times
// 9. Change the color of the pen to a random color
// 8. Increase the length variable by 10
// 5. call your drawTriangle() method using your length variable
// 10. Turn the robot 6 degrees to the right
}
/* 2. fill in the method below to draw a triangle. Use the length variable when you call move(). */
private void drawTriangle(int length) {
}
public static void main(String[] args) {
new TriangleShell().go();
}
}