-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
32 lines (29 loc) · 944 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Морской бой</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" rel="stylesheet">
</head>
<body>
<div id="gameArea">
<div class="footer htmlpreview-fallback">
<button class="btn" onclick="runGame(true)">Начать игру</button>
</div>
</div>
<script src="index.js"></script>
<script>
function runGame(startImmediatly) {
var game = new SeeBattle('gameArea');
game.run();
// fallback для htmlpreview
if (startImmediatly) {
game.startNewGame();
}
}
</script>
</body>
</html>