-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (97 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
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/ico" href="img/favicon.ico" sizes="32x32" />
<title>Checkers AI</title>
<style>
td,
th {
text-align: center;
}
td {
font-size: 16px;
font-weight: 600;
letter-spacing: 2px;
}
tr:nth-child(odd) {
background-color: white;
}
tr:nth-child(even) {
background-color: lightgray;
}
table {
border-collapse: collapse;
}
</style>
<link href="main.css" rel="stylesheet"></head>
<body class="bg-gray-400">
<div class="flex flex-col items-center">
<div class="my-6">
<h1 class="text-black text-6xl font-bold">Checkers AI</h1>
</div>
<div class="flex flex-wrap items-stretch gap-8">
<!-- Main Game -->
<div class="p-4 bg-orange-800">
<div id="checkers"></div>
</div>
<div class="w-80 flex flex-col justify-between">
<table
id="move-notation"
class="w-full bg-white text-xl border-2 border-black shadow"
>
<thead class="block border-b-2 border-black">
<th class="w-40 h-12 bg-slate-500 text-white">Black</th>
<th class="w-40 h-12 bg-slate-500 text-white">White</th>
</thead>
<tbody class="h-80 overflow-y-auto block"></tbody>
</table>
<div class="flex flex-col gap-2">
<div>
<button
class="px-4 py-2 bg-black text-white font-bold"
onclick="undo()"
>
Undo
</button>
<button
class="px-4 py-2 bg-white text-black font-bold"
onclick="redo()"
>
Redo
</button>
</div>
<div>
<button
class="px-4 py-2 w-full bg-white text-black font-bold shadow"
onclick="flip()"
>
Flip board
</button>
</div>
<!-- New Game Buttons -->
<div
class="bg-slate-300 py-2 flex justify-around items-center shadow"
>
<span class="w-24">New Game</span>
<button
class="px-4 py-2 bg-black text-white font-bold"
onclick="playBlack()"
>
Black
</button>
<button
class="px-4 py-2 bg-white text-black font-bold"
onclick="playWhite()"
>
White
</button>
</div>
</div>
</div>
</div>
</div>
<script src="bundle.js"></script></body>
</html>