-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpuz103.html
167 lines (166 loc) · 7.2 KB
/
puz103.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
<!-- v1.02 Added grid and bumbled through the text box formatting -->
<!-- 24/3/21, Nev - added grunt code to fill the text boxes - just to get it working -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>v1.03 Binary Puzzle 6x6</title>
<script type='text/javascript'>
// 24/7/19 - 6x6 table of text boxes with some initial test values
function initialNumbers() { // sets the initial problem
document.getElementById('A1').value = 1; // Hard code
document.getElementById('A2').value = ""; // Hard code
document.getElementById('A3').value = 0;
document.getElementById('A4').value = null; //not sure yet whether to use nulls or empty strings
document.getElementById('A5').value = 0;
document.getElementById('A6').value = 0;
document.getElementById('B1').value = "";
document.getElementById('B2').value = 1;
document.getElementById('B3').value = "";
document.getElementById('B4').value = 0;
document.getElementById('B5').value = 0;
document.getElementById('B6').value = "";
document.getElementById('C1').value = "";
document.getElementById('C2').value = "";
document.getElementById('C3').value = "";
document.getElementById('C4').value = "";
document.getElementById('C5').value = "";
document.getElementById('C6').value = 0;
document.getElementById('D1').value = 0;
document.getElementById('D2').value = "";
document.getElementById('D3').value = "";
document.getElementById('D4').value = 1;
document.getElementById('D5').value = "";
document.getElementById('D6').value = "";
document.getElementById('E1').value = 1;
document.getElementById('E2').value = 0;
document.getElementById('E3').value = "";
document.getElementById('E4').value = 1;
document.getElementById('E5').value = 1;
document.getElementById('E6').value = "";
document.getElementById('F1').value = "";
document.getElementById('F2').value = 0;
document.getElementById('F3').value = "";
document.getElementById('F4').value = "";
document.getElementById('F5').value = 1;
document.getElementById('F6').value = 1;
}
</script>
<style type="text/css">
/* 30/7/19 Rain Holloway (2020 student) - to eliminate double lines */
* {
padding: 0;
border-collapse: collapse;
}
/* 27/7/19 Nev - for formatting of the table cells */
.gameboard {
width: 40px;
height: 40px;
font-size: 30px;
color: #0B1AB8;
vertical-align: middle;
text-align: center;
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #ED2428;
}
</style>
</head>
<body onload="initialNumbers()">
<!-- the "initialNumbers" above does the initial load -->
<form id="input">
<h1>v1.03 Binary Puzzle Game (6x6)</h1>
<h2>v1.03: Box borders cleaned with a couple of lines of CSS from 2020 student Rain Holloway</h2>
<p>Return to <a href="index.html">home</a>:</p>
<p> </p>
<!-- set up the board as a table with a textbox in each cell -->
<table class="gameboard">
<tr>
<td>
<input id="A1" type="text" class="gameboard" /></td>
<td>
<input id="A2" type="text" class="gameboard" /></td>
<td>
<input id="A3" type="text" class="gameboard" /></td>
<td>
<input id="A4" type="text" class="gameboard" /></td>
<td>
<input id="A5" type="text" class="gameboard" /></td>
<td>
<input id="A6" type="text" class="gameboard" /></td>
</tr>
<tr>
<td>
<input id="B1" type="text" class="gameboard" /></td>
<td>
<input id="B2" type="text" class="gameboard" /></td>
<td>
<input id="B3" type="text" class="gameboard" /></td>
<td>
<input id="B4" type="text" class="gameboard" /></td>
<td>
<input id="B5" type="text" class="gameboard" /></td>
<td>
<input id="B6" type="text" class="gameboard" /></td>
</tr>
<tr>
<td>
<input id="C1" type="text" class="gameboard" /></td>
<td>
<input id="C2" type="text" class="gameboard" /></td>
<td>
<input id="C3" type="text" class="gameboard" /></td>
<td>
<input id="C4" type="text" class="gameboard" /></td>
<td>
<input id="C5" type="text" class="gameboard" /></td>
<td>
<input id="C6" type="text" class="gameboard" /></td>
</tr>
<tr>
<td>
<input id="D1" type="text" class="gameboard" /></td>
<td>
<input id="D2" type="text" class="gameboard" /></td>
<td>
<input id="D3" type="text" class="gameboard" /></td>
<td>
<input id="D4" type="text" class="gameboard" /></td>
<td>
<input id="D5" type="text" class="gameboard" /></td>
<td>
<input id="D6" type="text" class="gameboard" /></td>
</tr>
<tr>
<td>
<input id="E1" type="text" class="gameboard" /></td>
<td>
<input id="E2" type="text" class="gameboard" /></td>
<td>
<input id="E3" type="text" class="gameboard" /></td>
<td>
<input id="E4" type="text" class="gameboard" /></td>
<td>
<input id="E5" type="text" class="gameboard" /></td>
<td>
<input id="E6" type="text" class="gameboard" /></td>
</tr>
<tr>
<td>
<input id="F1" type="text" class="gameboard" /></td>
<td>
<input id="F2" type="text" class="gameboard" /></td>
<td>
<input id="F3" type="text" class="gameboard" /></td>
<td>
<input id="F4" type="text" class="gameboard" /></td>
<td>
<input id="F5" type="text" class="gameboard" /></td>
<td>
<input id="F6" type="text" class="gameboard" /></td>
</tr>
</table>
<br />
</form>
</body>
</html>