forked from 00range/FifteenPuzzle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (49 loc) · 2.19 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
<!-- Project 2, Fifteen tile puzzle, by Abdullah Hadid -- University of Michigan- Dearborn. Assigned by professor: Jinhua Guo -->
<!DOCTYPE HTML>
<html>
<head>
<title>Fifteen-Puzzle</title>
<link rel = "stylesheet" type = "text/css" href ="15Styling.css">
<script src="FifteenJavaScript.js" type="text/javascript"></script>
</head>
<body onload="start()">
<h2>The Puzzle of the Fifteen Tiles</h2>
<h2> By: Abdullah Hadid </h2>
<p> The object of this game is to arrange the tiles in order by numbers, row by row, with the bottom right corner having an empty tile.</p>
<p> The Simple Game button gives you a game that is 1 tile from being solved, to demonstrate how the game is solved. </p>
<table class="special">
<tr>
<td class="cell" onclick="doClick(this)" id="0">1</td>
<td class="cell" onclick="doClick(this)" id="1">2</td>
<td class="cell" onclick="doClick(this)" id="2">3</td>
<td class="cell" onclick="doClick(this)" id="3">4</td>
</tr>
<tr>
<td class="cell" onclick="doClick(this)" id="4">5</td>
<td class="cell" onclick="doClick(this)" id="5">6</td>
<td class="cell" onclick="doClick(this)" id="6">7</td>
<td class="cell" onclick="doClick(this)" id="7">8</td>
</tr>
<tr>
<td class="cell" onclick="doClick(this)" id="8">9</td>
<td class="cell" onclick="doClick(this)" id="9">10</td>
<td class="cell" onclick="doClick(this)" id="10">11</td>
<td class="cell" onclick="doClick(this)" id="11">12</td>
</tr>
<tr>
<td class="cell" onclick="doClick(this)" id="12">13</td>
<td class="cell" onclick="doClick(this)" id="13">14</td>
<td class="cell" onclick="doClick(this)" id="14">15</td>
<td class="cell" onclick="doClick(this)" id="15"></td>
</tr>
</table>
<p id="moves">Number of moves so far: </p>
<p id="time">Amount spent on current game in seconds: </p>
<p>
<button onclick="simpleGame()">Simple Game</button>
<button onclick="window.location.reload()">Start New Game</button>
</p>
<p>
</p>
</body>
</html>