This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
SnakeAndLadders.html
53 lines (49 loc) · 1.81 KB
/
SnakeAndLadders.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
<!DOCTYPE html">
<html>
<head>
<title>Snakes and Ladders</title>
<style>
#wrapper {
margin: 0px auto;
padding: 0;
border: 2px solid black;
width: 1760px;
height: 1760px;
}
</style>
</head>
<body>
<div id="preamble">
<h1>Snakes and Ladders</h1>
<h2>Players</h2>
<table>
<thead><tr>
<th>Player name</th><th>Position</th><th>Dice Roll</th>
</tr></thead>
<tbody data-bind="foreach: players"><tr>
<td><input data-bind="value: name" /></td>
<td data-bind="text: position"></td>
<td data-bind="text: diceRoll"></td>
</tr></tbody>
</table>
<input type="button" value="Reset" onClick="gameVM.newGame();"></input>
<button data-bind="click: nextTurn, enable: isGameOver() == false">Roll next turn</button>
<button data-bind="click: addPlayer">Add Player</button>
<input type="button" value="Game Status" onClick="game.gameState();"></input>
<input type="button" value="Test Victory" onClick="game.testVictory();"></input>
<input type="button" value="Reset Game" onClick="gameVM.defaultSetup()" ></input>
</div>
<div id="wrapper" >
<div data-bind="foreach: players">
<div class="tokens" data-bind="attr:{id: name}" style="position:relative;" ><img src="monkey_token.png" width="170" height="153" style="position: absolute;" /></div>
</div>
<img id="board" src="Game-Board-Snakes-and-Ladders-Full_no_boarder.gif" />
</div>
</body>
<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.easing.1.3.js" type="text/javascript"></script>
<script src="Animations.js" type="text/javascript"></script>
<script src="knockout-2.0.0.js" type="text/javascript"></script>
<script src="SnakesAndLaddersLogic.js" type="text/javascript"></script>
<script src="ViewModelSnakeAndLadders.js" type="text/javascript"></script>
</html>