forked from denhamd17/ProjectMinesweeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStart.java
More file actions
56 lines (41 loc) · 1.25 KB
/
Copy pathStart.java
File metadata and controls
56 lines (41 loc) · 1.25 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
54
55
56
package minesweeper;
import java.awt.*;
import java.util.Random;
public class Start extends EasyApp {
public static int port;
public static void main(String[] args) {
new Start();
}
Button times10 = addButton("Host", 100, 50, 100, 50, this);
Button times15 = addButton("Client", 100, 200, 100, 50, this);
//Button times20 = addButton("20x20", 100, 350, 100, 50, this);
public Start() {
setTitle("Minesweeper");
setBounds(0, 0, 300, 450);
this.setLocationRelativeTo(null);
this.setResizable(false);
times10.setBackground(new Color(0, 153, 204));
times15.setBackground(new Color(0, 153, 204));
//times20.setBackground(new Color(0, 153, 204));
times10.setForeground(Color.BLACK);
times15.setForeground(Color.BLACK);
//times20.setForeground(Color.BLACK);
}
public void actions(Object source, String command) {
if (source == times10) {
//host
System.out.println("yeet");
new Minesweeper(10, 10,0,0,1,false,new Server());
dispose();
}
if (source == times15) {
System.out.println("yeet");
new Minesweeper(10, 10,0,0,1,false,new Client());
dispose();
}
// if (source == times20) {
// new Minesweeper(20, 20,0,0,1);
// dispose();
// }
}
}