-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (42 loc) · 1.25 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PVE</title>
<link href="css/PVE.css" rel="stylesheet" type="text/css">
<script src="js/jquery-1.7.2.min.js"></script>
</head>
<body>
<!--新增了h1-->
<div id="chessboard">
<h1>五 子 棋 人 机 对 战</h1>
<div id ='account'>
Player's Chess type:
<select id ="type">
<option value=1>Black</option>
<option value=-1>White</option>
</select>
</div>
<br>
<canvas id="canvas" width="610" height="610" ></canvas>
<div id="status">Please press start to play chess !</div>
<div class="button-box">
<button type="button" id="start">Start</button>
<button type="button" id="huiqi">Withdraw</button>
<a href="index.html" ><button type="button" id="tuichu">Restart</button></a>
</div>
</div>
</body>
<script>
//定义参数
var canvas=document.getElementById('canvas');
var cxt=canvas.getContext('2d');
var img_b=new Image();
img_b.src ="images/b.png";
var img_w=new Image();
img_w.src="images/w.png";
</script>
<script src="js/const.js"></script>
<script src="js/chessboard.js"></script>
<script src="js/interact.js"></script>
</html>