forked from pirateksh/Connect-Four-Game
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathindex.html
More file actions
116 lines (114 loc) · 5.12 KB
/
index.html
File metadata and controls
116 lines (114 loc) · 5.12 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html>
<head>
<title>Connect Four</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
<div class="navbar">
<p id="nameOfGame">Connect Four Game</p>
</div>
</header>
<div id="start" align="center">
<h1>Welcome to connect Four!</h1>
<button onclick="inputs()">Start Game</button>
</div>
<div id="nameInput" align="center">
<div id="modal">
<span class="close" onclick="Close()">×</span>
<h1>Welcome to connect Four!</h1>
<label for="player1">Enter player 1 name</label>
<input id="player1" name="player1" placeholder="player 1"><br>
<label for="player2">Enter player 2 name</label>
<input id="player2" name="player2" placeholder="player 2"><br>
<!-- "Each playtime" field is to input the time that every player will get to make his/her move -->
<label for="timeforplay">Move Time(seconds)</label>
<input type="number" id="timeforplay" name="timeforplay" placeholder="Each playtime"><br>
<button onclick="namesInput(); startTimer()">Continue</button>
</div>
</div>
<div class="container-fluid" id="gamepage" align="center">
<h1>Welcome to Connect Four Game!</h1>
<h2 id="instruct">Connect 4 chips to win!</h2>
<div class="row mx-5">
<h3 class="plyr1 mr-auto"></h3>
<div id="timer-wrap" class="centered"><span id="timer">0 </span> seconds remaining!</div>
<h3 class="plyr2 ml-auto"></h3>
</div>
<table class="board">
<tr>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
</tr>
<tr>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
</tr>
<tr>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
</tr>
<tr>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
</tr>
<tr>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
</tr>
<tr>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
<td><button type="button" onclick = "startTimer()"></button></td>
</tr>
</table>
</div>
<div id="game-over" align="center">
<div id="modal">
<h2 class="winner"></h2>
<button onclick="window.location.reload()">Play Again ?</button>
</div>
</div>
<footer>
<div class="footer">
<p>Made By: <a href="https://github.com/pirateksh">Kshitiz Srivastava</a></p>
</div>
</footer>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script src="myScripts.js"></script>
</body>
</html>