-
Notifications
You must be signed in to change notification settings - Fork 0
/
WorldMap.java~
53 lines (33 loc) · 1014 Bytes
/
WorldMap.java~
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 java.swing.*;
import java.awt.*;
import java.awt.event.*;
public class WorldMap {
static protected WorldMapImpl map = null;
static public void createWorldMap(int x, int y) {
if(!(map == null)) {
System.out.println("WorldMap already created");
System.exit(0);
} else {
map = new WorldMapImpl(x,y);
try { Thread.sleep(100); } catch (Exception e) {}
}
}
static public void displaySquare(Position pos, String color) {
if(map == null) {
System.out.println("WorldMap not created yet.");
System.exit(0);
}
map.displaySquareInst(pos, color);
}
static public void paus(int millis) {
try{ Thread.sleep(millis); } catch(Exception e) {}
}
static class WorldMapImpl extends JPanel {
private static final long serialVersionUID = OL;
protected static final int SQUARE_SIZE = 22;
protected static final int PENT_SIZE = 9;
protected static final int INSET = 10;
protected int width, height;
protected Cell board[][];
}
}