-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
52 lines (49 loc) · 1.86 KB
/
Copy pathscript.py
File metadata and controls
52 lines (49 loc) · 1.86 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
start = "Map<Square, javax.swing.JLabel> gui_squares_api = new HashMap<Square, javax.swing.JLabel>(){{\n"
meat = ""
end = "}};"
for i in range(0, 10):
for j in range(0, 10):
gui_button = "jl" + str(i) + str(j)
action = " put(all_squares[{i}][{j}], {gui_button});\n".format(i = i, j = j, gui_button = gui_button)
meat += action
print(gui_button)
print("jl" + str(i) + "A")
gui_button = "jl" + str(i) + "A"
action = " put(all_squares[{i}][10], {gui_button});\n".format(i = i, gui_button = gui_button)
meat += action
print("jl" + str(i) + "B")
gui_button = "jl" + str(i) + "B"
action = " put(all_squares[{i}][11], {gui_button});\n".format(i = i, gui_button = gui_button)
meat += action
# for A
for j in range(0, 10):
gui_button = "jl" + "A" + str(j)
action = " put(all_squares[10][{j}], {gui_button});\n".format(j = j, gui_button = gui_button)
meat += action
print(gui_button)
# put(all_squares[i]);
gui_button = "jl" + "A" + "A"
action = " put(all_squares[10][10], {gui_button});\n".format(gui_button = gui_button)
meat += action
print(gui_button)
gui_button = "jl" + "A" + "B"
action = " put(all_squares[10][11], {gui_button});\n".format(gui_button = gui_button)
meat += action
print(gui_button)
# for B
for j in range(0, 10):
gui_button = "jl" + "B" + str(j)
action = " put(all_squares[11][{j}], {gui_button});\n".format(j = j, gui_button = gui_button)
meat += action
print(gui_button)
# put(all_squares[i]);
gui_button = "jl" + "B" + "A"
action = " put(all_squares[11][10], {gui_button});\n".format(gui_button = gui_button)
meat += action
print(gui_button)
gui_button = "jl" + "B" + "B"
action = " put(all_squares[11][11], {gui_button});\n".format(gui_button = gui_button)
meat += action
print(gui_button)
print("\n FUNCTION \n")
print(start + meat + end)