-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstarter.java
More file actions
53 lines (44 loc) · 1.43 KB
/
starter.java
File metadata and controls
53 lines (44 loc) · 1.43 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
import pkg.*;
import java.util.*;
public class starter implements InputControl, InputKeyControl
{
public static void p(String s) {System.out.print(s);}
static Grid g;
public static void main(String args[])
{
// User input
KeyController kC = new KeyController(Canvas.getInstance(),new starter());
MouseController mC = new MouseController(Canvas.getInstance(),new starter());
// clearTest();
Scanner sc = new Scanner(System.in);
//Grid g; // dimensions
int size;
//p("Enter side length of grid: ");
//size = sc.nextInt(); sc.nextLine();
g = new Grid(50, 50);
g.draw();
}
public void onMouseClick(double x, double y)
{
// enter code here
}
public void keyPress(String s)
{
if(s.equals("n"))
g.draw();
}
// public static void clearTest() { clear is confirmed to work
// Random rand = new Random();
// for(int i=0;i<10;i++) {
// for(int j=0;j<50000;j++) {
// Ellipse e = new Ellipse(rand.nextInt(1000),rand.nextInt(600),rand.nextInt(100),rand.nextInt(100));
// e.setColor(new Color(rand.nextInt(255), rand.nextInt(255), rand.nextInt(255)));
// e.fill();
// }
// System.out.println("pausing!");
// Canvas.pause(1000);
// Canvas.getInstance().clear();
// Canvas.pause(1000);
// }
// }
}