-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterview.html
68 lines (63 loc) · 5.18 KB
/
interview.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
<html>
<head>
<!--<script type="text/javascript"></script>
<script type="text/css"></script>-->
</head>
<body>
<form name="hanoi">
<div id="title" style="position: absolute; visibility: visible; left: 270px; top: 30px; width: 160px; height: 20px; font: bold 20px Tahoma; text-align: center;">Tower of Hanoi</div>
<div id="tower1" class="container" style="left: 30px; top: 80px; width: 200px; height: 200px;" onmousemove="indexTo=1">
<div id="verttower1" class="towervert" style="left:99px;top:10px;width:3px;height:170px"></div>
<div id="horiztower1" class="towerhoriz" style="left:0px;top:180px;width:200px;height:2px"></div>
<div class="tower">TOWER 1</div>
</div>
<div id="tower2" class="container" style="left: 250px; top: 80px; width: 200px; height: 200px;" onmousemove="indexTo=2">
<div id="verttower2" class="towervert" style="left:99px;top:10px;width:3px;height:170px"></div>
<div id="horiztower2" class="towerhoriz" style="left:0px;top:180px;width:200px;height:2px"></div>
<div class="tower">TOWER 2</div>
</div>
<div id="tower3" class="container" style="left: 470px; top: 80px; width: 200px; height: 200px;" onmousemove="indexTo=3">
<div id="verttower3" class="towervert" style="left:99px;top:10px;width:3px;height:170px"></div>
<div id="horiztower3" class="towerhoriz" style="left:0px;top:180px;width:200px;height:2px"></div>
<div class="tower">TOWER 3</div>
</div>
<div id="disk1" class="disk" style="left: 325px; top: 240px; width: 50px; height: 19px; background-color: pink; z-index: 45;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 1"></div>
<div id="disk2" class="disk" style="left: 95px; top: 140px; width: 70px; height: 19px; background-color: violet; z-index: 7;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 2"></div>
<div id="disk3" class="disk" style="left: 85px; top: 160px; width: 90px; height: 19px; background-color: indigo; z-index: 6;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 3"></div>
<div id="disk4" class="disk" style="left: 75px; top: 180px; width: 110px; height: 19px; background-color: blue; z-index: 5;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 4"></div>
<div id="disk5" class="disk" style="left: 65px; top: 200px; width: 130px; height: 19px; background-color: green; z-index: 4;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 5"></div>
<div id="disk6" class="disk" style="left: 55px; top: 220px; width: 150px; height: 19px; background-color: yellow; z-index: 3;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 6"></div>
<div id="disk7" class="disk" style="left: 45px; top: 240px; width: 170px; height: 19px; background-color: orange; z-index: 2;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 7"></div>
<div id="disk8" class="disk" style="left: -250px; top: -250px; width: 190px; height: 19px; background-color: red; z-index: 1;" onmousedown="initializeDrag(this,event)" onmouseup="dropDisk(this)" title="Disk 8"></div>
<div id="settings" class="container" style="display: none; left: 220px; top: 310px; width: 260px;">
<table>
<tbody>
<tr>
<td>No. of disks</td>
<td>
<select name="diskno" onchange="newGame(this)" onclick="prevIndex=this.options.selectedIndex">
<option value="7">3</option>
<option value="15">4</option>
<option value="31">5</option>
<option value="63">6</option>
<option selected="selected" value="127">7</option>
<option value="255">8</option>
</select>
</td>
</tr>
<tr><td>Minimum no. of moves </td>
<td><input name="minmove" style="border:none" size="3" value="127" readonly="readonly"></td></tr>
<tr><td>Your no. of moves</td>
<td><input name="yourmove" style="border:none" size="3" value="0" readonly="readonly"></td></tr>
<tr><td colspan="2" align="center">
<input name="btnIns" value="Instructions" onclick="displayIns()" type="button">
<input name="btnRes" value="Restart" onclick="newGame(document.hanoi.diskno)" type="button">
<input name="btnUndo" value="Undo" onclick="unDo(this)" disabled="disabled" type="button">
<input name="btnSolve" value="Solve" onclick="solve(this)" type="button">
</td></tr>
</tbody>
</table>
</div>
</form>
</body>
</html>