-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsketch_15_puzzle.pde
More file actions
52 lines (48 loc) · 1.26 KB
/
sketch_15_puzzle.pde
File metadata and controls
52 lines (48 loc) · 1.26 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
int i, j, selectedTile, TileSize,
temp, x_fp, y_fp,x_b01, y_b01,startTime, initiatedTime,
x_b02, y_b02, x_b03, y_b03, x_helpimg,
helpimg_toggle, x_time, y_time, x_fullimg,y_fullimg, fullimg_toggle;
int[] x=new int[17];
int[] y=new int[17];
int[] x_temp=new int[17];
PImage[] img=new PImage[17];
PImage frontImage, fullimg, helpimg, button01, button02, button03;
String[] TimeStr = new String[3];
void setup() {
size (800, 860);
TileSize=200;
fullimg_toggle=0;
helpimg_toggle=0;
startTime=0;
fullimg = loadImage("images/FullMap1.jpg");
frontImage=loadImage("images/OpenImage.jpg");
helpimg=loadImage("images/Help01.jpg");
button01 = loadImage("images/switch1.jpg");
button02 = loadImage("images/switch2.jpg");
button03 = loadImage("images/switch3.jpg");
// The coordinates in menu
x_fp=0;
y_fp=0;
x_b01=900;
y_b01=900;
x_b02=900;
y_b02=900;
x_b03=900;
y_b03=900;
x_time=900;
// y_time=900;
x_fullimg=900;
y_fullimg=0;
x_helpimg=900;
for (int i = 1; i <= 16; ++i) {
x[i]=900;
y[i]=900;
}
for (int i = 1; i <= 16; ++i) {
x_temp[i]=-1;
}
//To load the 16 tiles of images
LoadPuzzel01();
fill(100, 250, 100);
rect(200, 805, 200, 50);
}