-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (57 loc) · 1.43 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>five-in-row</title>
<link rel="stylesheet" href="./css/index.css">
<script src="./bower_components/jquery/dist/jquery.js"></script>
<script src="./js/index.js"></script>
</head>
<body>
<div class="box">
<canvas id="canvas" width="600" height="600"></canvas>
<div class="cartel">
<div class="tips">
<h6 id="tishi"></h6>
<i id="close"></i>
<span id="restart">再来一局</span>
<span id="qipu">生成棋谱</span>
</div>
</div>
<a id="save" href="" download="">保存棋谱</a>
</div>
<audio id="black_play" src="./music/022.wav"></audio>
<audio id="white_play" src="./music/024.wav"></audio>
</body>
</html>
<!-- <script>
var canvas = document.querySelector('#canvas');
var ctx = canvas.getContext('2d');
var huaqipan = function(){
ctx.clearRect(0,0,600,600);
// 横线
ctx.save();
for(var i = 0; i < 15; i ++){
ctx.save();
ctx.beginPath();
ctx.translate(0,40);
ctx.moveTo(0,0);
ctx.lineTo(600,0);
ctx.stroke();
ctx.closePath();
}
ctx.restore();
// 竖线
ctx.save();
for(var i = 0; i < 15; i ++){
ctx.beginPath();
ctx.translate(40,0);
ctx.moveTo(0,0);
ctx.lineTo(0,600);
ctx.stroke();
ctx.closePath();
}
ctx.restore();
}
huaqipan();
</script> -->