-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
40 lines (34 loc) · 1022 Bytes
/
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
<!DOCTYPE html>
<head>
<title>五子棋</title>
<link rel="stylesheet" type="text/css" href="fiveChess.css">
</head>
<!-- <meta name="viewport" content="width=device-width,user-scalable=no,maximum=1.0,minimum=1.0,initial-scale=1.0"/> -->
<body>
<div id="wrap"></div>
<div class="btnCon">
<button type="button" id="backBtn">悔棋</button>
<button type="button" id="revokeBackBtn">撤销悔棋</button>
<button type="button" id="reStartBtn">重新开始</button>
</div>
<script type="text/javascript" src="./fiveChess.js"></script>
<script type="text/javascript" src="./machine.js"></script>
<script type="text/javascript">
//初始化
var option = {
'containId': '#wrap',
'backId': '#backBtn',
'revokeBackId': '#revokeBackBtn',
'restartId': '#reStartBtn',
//'useDom': true,
'winCallback': function(bool){
var color = bool===1?'黑':'白';
setTimeout(function(){
alert(color+'棋赢');
},0)
},
};
var fiveChressobj = new FiveChess(option);
fiveChressobj.init();
</script>
</body>