-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (39 loc) · 1.06 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
<html>
<head>
<title>Chopsticks SP</title>
<style type="text/css">
td,th{
padding : 20 20 20 20;
}
</style>
</head>
<body onload="render();">
<table border="solid black">
<thead>
<th></th>
<th>Left</th>
<th>Right</th>
</thead>
<tbody>
<tr>
<th>Player 2</th>
<td id="p2l" style="text-align: center;">0</td>
<td id="p2r" style="text-align: center;">0</td>
</tr>
<tr>
<th>Player 1</th>
<td id="p1l" style="text-align: center;">0</td>
<td id="p1r" style="text-align: center;">0</td>
</tr>
</tbody>
</table><br>
<p id="current-player">Move: Player1</p>
<button onclick="gameLoop('ll');">Left to Left</button><br><br>
<button onclick="gameLoop('lr');">Left to Right</button><br><br>
<button onclick="gameLoop('rl');">Right to Left</button><br><br>
<button onclick="gameLoop('rr');">Right to Right</button><br><br>
<button onclick="gameLoop('s');">Split</button>
<p id="error-log" style="color: red;"></p>
<script type="text/javascript" src="chopsticks.js"></script>
</body>
</html>