forked from ajaycmohanan/SuDoKu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
138 lines (131 loc) · 7.26 KB
/
index.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>SudoKu Solver</title>
<!-- Adding our custom css file -->
<link rel="stylesheet" href="./css/master.css">
<!-- Adding Bootstrap CDN -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<h2>SUDOKU SOLVER <span class = "author">JavaScript</h2>
<!-- Our initial Board -->
<div id="initialBoard">
<input id="1" type="number" maxlength="1" max="9" min="1">
<input id="2" type="number" maxlength="1" max="9" min="1">
<input id="3" type="number" maxlength="1" max="9" min="1">
<input id="4" type="number" maxlength="1" max="9" min="1">
<input id="5" type="number" maxlength="1" max="9" min="1">
<input id="6" type="number" maxlength="1" max="9" min="1">
<input id="7" type="number" maxlength="1" max="9" min="1">
<input id="8" type="number" maxlength="1" max="9" min="1">
<input id="9" type="number" maxlength="1" max="9" min="1">
<br>
<input id="10" type="number" maxlength="1" max="9" min="1">
<input id="11" type="number" maxlength="1" max="9" min="1">
<input id="12" type="number" maxlength="1" max="9" min="1">
<input id="13" type="number" maxlength="1" max="9" min="1">
<input id="14" type="number" maxlength="1" max="9" min="1">
<input id="15" type="number" maxlength="1" max="9" min="1">
<input id="16" type="number" maxlength="1" max="9" min="1">
<input id="17" type="number" maxlength="1" max="9" min="1">
<input id="18" type="number" maxlength="1" max="9" min="1">
<br>
<input id="19" type="number" maxlength="1" max="9" min="1">
<input id="20" type="number" maxlength="1" max="9" min="1">
<input id="21" type="number" maxlength="1" max="9" min="1">
<input id="22" type="number" maxlength="1" max="9" min="1">
<input id="23" type="number" maxlength="1" max="9" min="1">
<input id="24" type="number" maxlength="1" max="9" min="1">
<input id="25" type="number" maxlength="1" max="9" min="1">
<input id="26" type="number" maxlength="1" max="9" min="1">
<input id="27" type="number" maxlength="1" max="9" min="1">
<br>
<input id="28" type="number" maxlength="1" max="9" min="1">
<input id="29" type="number" maxlength="1" max="9" min="1">
<input id="30" type="number" maxlength="1" max="9" min="1">
<input id="31" type="number" maxlength="1" max="9" min="1">
<input id="32" type="number" maxlength="1" max="9" min="1">
<input id="33" type="number" maxlength="1" max="9" min="1">
<input id="34" type="number" maxlength="1" max="9" min="1">
<input id="35" type="number" maxlength="1" max="9" min="1">
<input id="36" type="number" maxlength="1" max="9" min="1">
<br>
<input id="37" type="number" maxlength="1" max="9" min="1">
<input id="38" type="number" maxlength="1" max="9" min="1">
<input id="39" type="number" maxlength="1" max="9" min="1">
<input id="40" type="number" maxlength="1" max="9" min="1">
<input id="41" type="number" maxlength="1" max="9" min="1">
<input id="42" type="number" maxlength="1" max="9" min="1">
<input id="43" type="number" maxlength="1" max="9" min="1">
<input id="44" type="number" maxlength="1" max="9" min="1">
<input id="45" type="number" maxlength="1" max="9" min="1">
<br>
<input id="46" type="number" maxlength="1" max="9" min="1">
<input id="47" type="number" maxlength="1" max="9" min="1">
<input id="48" type="number" maxlength="1" max="9" min="1">
<input id="49" type="number" maxlength="1" max="9" min="1">
<input id="50" type="number" maxlength="1" max="9" min="1">
<input id="51" type="number" maxlength="1" max="9" min="1">
<input id="52" type="number" maxlength="1" max="9" min="1">
<input id="53" type="number" maxlength="1" max="9" min="1">
<input id="54" type="number" maxlength="1" max="9" min="1">
<br>
<input id="55" type="number" maxlength="1" max="9" min="1">
<input id="56" type="number" maxlength="1" max="9" min="1">
<input id="57" type="number" maxlength="1" max="9" min="1">
<input id="58" type="number" maxlength="1" max="9" min="1">
<input id="59" type="number" maxlength="1" max="9" min="1">
<input id="60" type="number" maxlength="1" max="9" min="1">
<input id="61" type="number" maxlength="1" max="9" min="1">
<input id="62" type="number" maxlength="1" max="9" min="1">
<input id="63" type="number" maxlength="1" max="9" min="1">
<br>
<input id="64" type="number" maxlength="1" max="9" min="1">
<input id="65" type="number" maxlength="1" max="9" min="1">
<input id="66" type="number" maxlength="1" max="9" min="1">
<input id="67" type="number" maxlength="1" max="9" min="1">
<input id="68" type="number" maxlength="1" max="9" min="1">
<input id="69" type="number" maxlength="1" max="9" min="1">
<input id="70" type="number" maxlength="1" max="9" min="1">
<input id="71" type="number" maxlength="1" max="9" min="1">
<input id="72" type="number" maxlength="1" max="9" min="1">
<br>
<input id="73" type="number" maxlength="1" max="9" min="1">
<input id="74" type="number" maxlength="1" max="9" min="1">
<input id="75" type="number" maxlength="1" max="9" min="1">
<input id="76" type="number" maxlength="1" max="9" min="1">
<input id="77" type="number" maxlength="1" max="9" min="1">
<input id="78" type="number" maxlength="1" max="9" min="1">
<input id="79" type="number" maxlength="1" max="9" min="1">
<input id="80" type="number" maxlength="1" max="9" min="1">
<input id="81" type="number" maxlength="1" max="9" min="1">
<br>
</div>
<button onclick="initiate()" class="btn btn-primary">SOLVE</button>
<!-- Board to display the answers-->
<div id="answerboard">
<p id="row 1"></p>
<p id="row 2"></p>
<p id="row 3"></p>
<p id="row 4"></p>
<p id="row 5"></p>
<p id="row 6"></p>
<p id="row 7"></p>
<p id="row 8"></p>
<p id="row 9"></p>
</div>
<script type="text/javascript">
//Populate the answer output board
const placeHolder = " 0 ";
for (var i = 1; i <= 9; i++){
document.getElementById("row " + String(i)).innerHTML = placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder + "\xa0\xa0\xa0\xa0\xa0\xa0" + placeHolder
}
</script>
<script src="js/sudoku.js"></script>
<script src="js/tanu.js"></script>
<script src="js/kulpreet.js"></script>
<script src="js/kunwar.js"></script>
</body>
</html>