-
Notifications
You must be signed in to change notification settings - Fork 0
/
playonline.html
89 lines (77 loc) · 5.02 KB
/
playonline.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
<!DOCTYPE html>
<html lang = "en">
<head>
<meta charset="UTF-8">
<!--<meta name="keywords" content="TicTacToe, tictactoe, Tic Tac Toe, tic tac toe, XO, X&O, X O, X and O">-->
<meta name="author" content="Amaan Kazi">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<title>Tic Tac Toe</title>
<meta name="description" content="Play Tic Tac Toe (X and O) with someone else online">
<link rel="stylesheet" href="stylesheets/playonline.css">
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
<!--Google Fonts-->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<!--<script defer src="https://cdn.socket.io/4.7.5/socket.io.min.js"></script>-->
<script defer src="js/playonline.js"></script>
</head>
<body>
<div id = "navbar">
<div id = "megaHeader">
<div id = "header">
<p id = "title">Tic Tac Toe</p>
<nav>
<button class = "navButton">
<a class = "navLink" href = "index.html">Home</a>
</button>
<button class = "navButton">
<a class = "navLink" href = "index.html">How To Play</a>
</button>
<button class = "navButton">
<a class = "navLink" href = "index.html">About</a>
</button>
</nav>
</div>
<hr>
</div>
</div>
<main>
<table cellspacing = 0 cellpadding = 5% id = "TicTacToeTable" style = "display: none">
<tr>
<td id = "00" class = "hb vb" onclick="gridInput(0, 0)" onmouseover="gridMouseOver(0, 0)" onmouseout="gridMouseOut(0, 0)"> </td>
<td id = "01" class = "hb vb" onclick="gridInput(0, 1)" onmouseover="gridMouseOver(0, 1)" onmouseout="gridMouseOut(0, 1)"> </td>
<td id = "02" class = "hb" onclick="gridInput(0, 2)" onmouseover="gridMouseOver(0, 2)" onmouseout="gridMouseOut(0, 2)"> </td>
</tr>
<tr>
<td id = "10" class = "hb vb" onclick="gridInput(1, 0)" onmouseover="gridMouseOver(1, 0)" onmouseout="gridMouseOut(1, 0)"> </td>
<td id = "11" class = "hb vb" onclick="gridInput(1, 1)" onmouseover="gridMouseOver(1, 1)" onmouseout="gridMouseOut(1, 1)"> </td>
<td id = "12" class = "hb" onclick="gridInput(1, 2)" onmouseover="gridMouseOver(1, 2)" onmouseout="gridMouseOut(1, 2)"> </td>
</tr>
<tr>
<td id = "20" class = "vb" onclick="gridInput(2, 0)" onmouseover="gridMouseOver(2, 0)" onmouseout="gridMouseOut(2, 0)"> </td>
<td id = "21" class = "vb" onclick="gridInput(2, 1)" onmouseover="gridMouseOver(2, 1)" onmouseout="gridMouseOut(2, 1)"> </td>
<td id = "22" onclick="gridInput(2, 2)" onmouseover="gridMouseOver(2, 2)" onmouseout="gridMouseOut(2, 2)"> </td>
</tr>
</table>
<div id = "forms">
<form name = "LoginForm" id = "Login" action = "#" autocomplete= "on">
<input type = "text" name = "username" id = "username" placeholder = "Enter a username"/>
<input type = "submit" name = "login_submit" value = "Log In">
</form>
<form name = "ChannelForm" id = "ChannelForm" action = "#" style = "display: none;" autocomplete = "off">
<input type = "text" name = "channel" id = "channel" placeholder = "Enter room id or create new room">
<input type = "button" name = "channel_create" id = "channelCreate" onclick = "createChannel()" value = "Create">
<input type = "submit" name = "channel_submit" id = "channelSubmit" value = "Join">
</form>
<form name = "SendMessage" id = "SendMessage" action = "#" style="display: none;" autocomplete = "off">
<input type = "text" name = "message" id = "message" palceholder = "Enter message"/>
<input type = "submit" name = "message_submit" value = "Send Message">
</form>
</div>
</main>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.8.0.1.js"></script>
<script src = "https://cdn.pubnub.com/sdk/javascript/pubnub.8.0.1.min.js"></script>
</body>
</html>