-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
93 lines (80 loc) · 2.9 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TicTacToe for the rich</title>
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
<link rel="stylesheet" type="text/css" href="boardstyle.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
<script src="https://cdn.rawgit.com/ethereum/web3.js/1.0/dist/web3.min.js"></script>
<script src="tictactoe.js"></script>
</head>
<body>
<div class="card-panel">
<h4>Set up</h4>
<div class="input-field col s6">
<input name="contractAddress" id="contractAddress" type="text" class="validate">
<label for="contractAddress">Contract Address (hardcode later)</label>
</div>
<div>
<label>Select your Account</label>
<select class="browser-default" onchange="changeUserAddress()" id='addressDropdown'></select>
</div>
<div>
<label>Account Balance</label>
<div id='accountBalance'>test</div>
</div>
</div>
<div class="card-panel">
<h4>Host or Join a game</h4>
<div class="input-field col s6">
<input name="hostAddress" id="hostAddress" type="text" class="validate">
<label for="hostAddress">Host address to join</label>
</div>
<button class="waves-effect waves-light btn" onclick="joinExistingGame();" id="button">Join hosted game</button>
<button class="waves-effect waves-light btn" onclick="host();" id="button">Host new game</button>
</div>
<div id="gameBoard" class="card-panel">
<h4 id="Actions" class="playerOnTurn">Please host or join a game!</h4>
<table>
<tr>
<td id="0-0" onclick="cellClick(this);">
<div class="content"><span class='field1'></span></div>
</td>
<td id="0-1" onclick="cellClick(this);">
<div class="content"><span class='field2'></span></div>
</td>
<td id="0-2" onclick="cellClick(this);">
<div class="content"><span class='field3'></span></div>
</td>
</tr>
<tr>
<td id="1-0" onclick="cellClick(this);">
<div class="content"><span class='field4'></span></div>
</td>
<td id="1-1" onclick="cellClick(this);">
<div class="content"><span class='field5'></span></div>
</td>
<td id="1-2" onclick="cellClick(this);">
<div class="content"><span class='field6'></span></div>
</td>
</tr>
<tr>
<td id="2-0" onclick="cellClick(this);">
<div class="content"><span class='field7'></span></div>
</td>
<td id="2-1" onclick="cellClick(this);">
<div class="content"><span class='field8'></span></div>
</td>
<td id="2-2" onclick="cellClick(this);">
<div class="content"><span class='field9'></span></div>
</td>
</tr>
</table>
</div>
</body>
</html>