forked from aiden2480/A2-UniTech-BinaryPuzzle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpuz116.html
204 lines (191 loc) · 8.65 KB
/
puz116.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Better support for mobile browsers -->
<title>v1.16 Binary Puzzle 6x6</title>
<!-- Load CSS/JS files, link icon -->
<link href = "CSS/puz116.css" rel = "stylesheet">
<script src = "JS/puz116.js"></script>
<link rel = "icon" href = "images/unitechsquare.png">
</head>
<body onload = "loadGrid(G01)">
<!-- Load Array G01 -->
<div>
<h1>v1.16 Binary Puzzle Game (6x6)</h1>
<h2>Code the "--Solve once--" button</h2>
<p>Return to <a href = "index.html">home</a></p> <!-- Linking Home Page -->
</div>
<!-- Game interaction -->
<div id = "options">
<!-- Game selection -->
<select id = "cboPuzNo" onchange = "loadGrid(eval(value))">
<option value = "G01">Example in Question</option>
<option value = "G02">Game 2</option>
<option value = "G03">Game 3</option>
<option value = "G04">Game 4</option>
<option value = "G05">Game 5</option>
<option value = "G06">Game 6</option>
<option value = "G07">Game 7</option>
<option value = "G08">Game 8</option>
<option value = "G09">Game 9</option>
<option value = "G10">Game 10</option>
<option value = "G11">Game 11</option>
<option value = "G12">Game 12</option>
<option value = "G13">Game 13</option>
<option value = "GT">Test 1 - 36</option>
</select>
<!-- Game solving options -->
<button type = "submit" onclick="BinaryPuzzleSolver()" class = "tooltip">--Solve Repeat--<span class = "tooltiptext top">Finish the puzzle</span></button>
<button type = "submit" onclick="SolvePuzzle()" class = "tooltip">--Solve once--<span class = "tooltiptext top">Run through <i>Pairs</i>, <i>Trios</i>, and <i>Complete</i> once</span></button>
<br />
<div>
<button type = "submit" onclick="SolveNumberPairs()" class = "tooltip">Pairs<span class = "tooltiptext bottom">Solve <i>RowPairs</i> and <i>ColPairs</i></span></button>
<button type = "submit" onclick="SolveRowPairs()" class = "tooltip">RowPairs<span class = "tooltiptext bottom">Solve <strong>horizontal</strong> number pairs</span></button>
<button type = "submit" onclick="SolveColPairs()" class = "tooltip">ColPairs<span class = "tooltiptext bottom">Solve <strong>vertical</strong> number pairs</span></button>
<button type = "submit" onclick="SolveNumberTrios()" class = "tooltip">Trios<span class = "tooltiptext bottom">Fill <strong>1</strong> or <strong>0</strong> between two identical number</span></button>
<button type = "submit" onclick="CompleteRowsCols()" class = "tooltip">Complete<span class = "tooltiptext bottom">Fill the blanks if row or column has <u>3</u> <strong>1</strong> or <strong>0</strong></span></button>
</div>
</div>
<!-- Empty space --> <div style = "margin: 1vh;"></div>
<div id = "game_and_info">
<div>
<!-- Naming convention B(1-6?Row)_(1-6?Col) -->
<table class = "gameboard">
<tr>
<td>
<input id = "B1_1" type = "text" class = "gameboard"/>
</td>
<td>
<input id = "B1_2" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B1_3" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B1_4" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B1_5" type = "text" class = "gameboard"/>
</td>
<td>
<input id = "B1_6" type = "text" class = "gameboard"/>
</td>
</tr>
<tr>
<td>
<input id = "B2_1" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B2_2" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B2_3" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B2_4" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B2_5" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B2_6" type = "text" class = "gameboard" />
</td>
</tr>
<tr>
<td>
<input id = "B3_1" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B3_2" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B3_3" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B3_4" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B3_5" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B3_6" type = "text" class = "gameboard" />
</td>
</tr>
<tr>
<td>
<input id = "B4_1" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B4_2" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B4_3" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B4_4" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B4_5" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B4_6" type = "text" class = "gameboard" />
</td>
</tr>
<tr>
<td>
<input id = "B5_1" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B5_2" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B5_3" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B5_4" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B5_5" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B5_6" type = "text" class = "gameboard" />
</td>
</tr>
<tr>
<td>
<input id = "B6_1" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B6_2" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B6_3" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B6_4" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B6_5" type = "text" class = "gameboard" />
</td>
<td>
<input id = "B6_6" type = "text" class = "gameboard" />
</td>
</tr>
</table>
</div>
<div>
<p class = "arrViewText">View of the 1D array:</p>
<textarea id = "arrayView1D" cols = "30" rows = "4"></textarea>
<!-- Empty space --> <div style = "margin: 1vh;"></div>
<p class = "arrViewText">View of the 2D array:</p>
<textarea id = "arrayView2D" cols = "30" rows = "6"></textarea>
</div>
</div>
<div id = "e_view">
<p class = "arrViewText">View of 1 element ([3][2]):</p>
<textarea id = "arrayViewCell" cols = "30" rows = "1"></textarea>
</div>
</body>
</html>