-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChessGrid.java
211 lines (201 loc) · 6.42 KB
/
ChessGrid.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.StackPane;
public class ChessGrid {
public ChessGrid(Stage primaryStage, GridPane grid) {
StackPane a1 = new StackPane();
a1.setMinSize(75, 75);
grid.add(a1, 0, 0);
StackPane a2 = new StackPane();
a2.setMinSize(75,75);
grid.add(a2, 1, 0);
StackPane a3 = new StackPane();
a3.setMinSize(75, 75);
grid.add(a3, 2, 0);
StackPane a4 = new StackPane();
a4.setMinSize(75,75);
grid.add(a4, 3, 0);
StackPane a5 = new StackPane();
a5.setMinSize(75, 75);
grid.add(a5, 4, 0);
StackPane a6 = new StackPane();
a6.setMinSize(75,75);
grid.add(a6, 5, 0);
StackPane a7 = new StackPane();
a7.setMinSize(75, 75);
grid.add(a7, 6, 0);
StackPane a8 = new StackPane();
a8.setMinSize(75,75);
grid.add(a8, 7, 0);
StackPane b1 = new StackPane();
b1.setMinSize(75, 75);
grid.add(b1, 0, 1);
StackPane b2 = new StackPane();
b2.setMinSize(75,75);
grid.add(b2, 1, 1);
StackPane b3 = new StackPane();
b3.setMinSize(75, 75);
grid.add(b3, 2, 1);
StackPane b4 = new StackPane();
b4.setMinSize(75,75);
grid.add(b4, 3, 1);
StackPane b5 = new StackPane();
b5.setMinSize(75, 75);
grid.add(b5, 4, 1);
StackPane b6 = new StackPane();
b6.setMinSize(75,75);
grid.add(b6, 5, 1);
StackPane b7 = new StackPane();
b7.setMinSize(75, 75);
grid.add(b7, 6, 1);
StackPane b8 = new StackPane();
b8.setMinSize(75,75);
grid.add(b8, 7, 1);
StackPane c1 = new StackPane();
c1.setMinSize(75, 75);
grid.add(c1, 0, 2);
StackPane c2 = new StackPane();
c2.setMinSize(75,75);
grid.add(c2, 1, 2);
StackPane c3 = new StackPane();
c3.setMinSize(75, 75);
grid.add(c3, 2, 2);
StackPane c4 = new StackPane();
c4.setMinSize(75,75);
grid.add(c4, 3, 2);
StackPane c5 = new StackPane();
c5.setMinSize(75, 75);
grid.add(c5, 4, 2);
StackPane c6 = new StackPane();
c6.setMinSize(75,75);
grid.add(c6, 5, 2);
StackPane c7 = new StackPane();
c7.setMinSize(75, 75);
grid.add(c7, 6, 2);
StackPane c8 = new StackPane();
c8.setMinSize(75,75);
grid.add(c8, 7, 2);
StackPane d1 = new StackPane();
d1.setMinSize(75, 75);
grid.add(d1, 0, 3);
StackPane d2 = new StackPane();
d2.setMinSize(75,75);
grid.add(d2, 1, 3);
StackPane d3 = new StackPane();
d3.setMinSize(75, 75);
grid.add(d3, 2, 3);
StackPane d4 = new StackPane();
d4.setMinSize(75,75);
grid.add(d4, 3, 3);
StackPane d5 = new StackPane();
d5.setMinSize(75, 75);
grid.add(d5, 4, 3);
StackPane d6 = new StackPane();
d6.setMinSize(75,75);
grid.add(d6, 5, 3);
StackPane d7 = new StackPane();
d7.setMinSize(75, 75);
grid.add(d7, 6, 3);
StackPane d8 = new StackPane();
d8.setMinSize(75,75);
grid.add(d8, 7, 3);
StackPane e1 = new StackPane();
e1.setMinSize(75, 75);
grid.add(e1, 0, 4);
StackPane e2 = new StackPane();
e2.setMinSize(75,75);
grid.add(e2, 1, 4);
StackPane e3 = new StackPane();
e3.setMinSize(75, 75);
grid.add(e3, 2, 4);
StackPane e4 = new StackPane();
e4.setMinSize(75,75);
grid.add(e4, 3, 4);
StackPane e5 = new StackPane();
e5.setMinSize(75, 75);
grid.add(e5, 4, 4);
StackPane e6 = new StackPane();
e6.setMinSize(75,75);
grid.add(e6, 5, 4);
StackPane e7 = new StackPane();
e7.setMinSize(75, 75);
grid.add(e7, 6, 4);
StackPane e8 = new StackPane();
e8.setMinSize(75,75);
grid.add(e8, 7, 4);
StackPane f1 = new StackPane();
f1.setMinSize(75, 75);
grid.add(f1, 0, 5);
StackPane f2 = new StackPane();
f2.setMinSize(75,75);
grid.add(f2, 1, 5);
StackPane f3 = new StackPane();
f3.setMinSize(75, 75);
grid.add(f3, 2, 5);
StackPane f4 = new StackPane();
f4.setMinSize(75,75);
grid.add(f4, 3, 5);
StackPane f5 = new StackPane();
f5.setMinSize(75, 75);
grid.add(f5, 4, 5);
StackPane f6 = new StackPane();
f6.setMinSize(75,75);
grid.add(f6, 5, 5);
StackPane f7 = new StackPane();
f7.setMinSize(75, 75);
grid.add(f7, 6, 5);
StackPane f8 = new StackPane();
f8.setMinSize(75,75);
grid.add(f8, 7, 5);
StackPane g1 = new StackPane();
g1.setMinSize(75, 75);
grid.add(g1, 0, 6);
StackPane g2 = new StackPane();
g2.setMinSize(75,75);
grid.add(g2, 1, 6);
StackPane g3 = new StackPane();
g3.setMinSize(75, 75);
grid.add(g3, 2, 6);
StackPane g4 = new StackPane();
g4.setMinSize(75,75);
grid.add(g4, 3, 6);
StackPane g5 = new StackPane();
g5.setMinSize(75, 75);
grid.add(g5, 4, 6);
StackPane g6 = new StackPane();
g6.setMinSize(75,75);
grid.add(g6, 5, 6);
StackPane g7 = new StackPane();
g7.setMinSize(75, 75);
grid.add(g7, 6, 6);
StackPane g8 = new StackPane();
g8.setMinSize(75,75);
grid.add(g8, 7, 6);
StackPane h1 = new StackPane();
h1.setMinSize(75, 75);
grid.add(h1, 0, 7);
StackPane h2 = new StackPane();
h2.setMinSize(75,75);
grid.add(h2, 1, 7);
StackPane h3 = new StackPane();
h3.setMinSize(75, 75);
grid.add(h3, 2, 7);
StackPane h4 = new StackPane();
h4.setMinSize(75,75);
grid.add(h4, 3, 7);
StackPane h5 = new StackPane();
h5.setMinSize(75, 75);
grid.add(h5, 4, 7);
StackPane h6 = new StackPane();
h6.setMinSize(75,75);
grid.add(h6, 5, 7);
StackPane h7 = new StackPane();
h7.setMinSize(75, 75);
grid.add(h7, 6, 7);
StackPane h8 = new StackPane();
h8.setMinSize(75,75);
grid.add(h8, 7, 7);
}
}