-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
75 lines (73 loc) · 2.67 KB
/
Copy pathindex.html
File metadata and controls
75 lines (73 loc) · 2.67 KB
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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Kablamo!</title>
<link href="theme.css" rel="stylesheet" />
</head>
<body>
<h1>Kablamo!</h1>
<div id="container">
<svg id="svg"></svg>
<div id="gameControls">
<div>
<label>Red</label>
<select id="redStrategy">
</select>
</div>
<div>
<label>Blue</label>
<select id="blueStrategy">
</select>
</div>
<div>
<button id="btnStart">Start</button>
</div>
<div>
<button id="btnPause" data-paused="0">Pause</button>
</div>
<div>
<label>Who's Turn?</label>
<span id="spnPlayer"></span>
</div>
<div>
<button id="btnReset">Reset</button>
</div>
</div>
</div>
<div id="rulesHeader">
<h3>Rules</h3>
<div>
rules by David Smelser
</div>
</div>
<ul id="rules">
<li>There are two players: Red and Blue.</li>
<li>Blue starts.</li>
<li>Each player has three shades of their color:
<ul>
<li>The darkest, the initial corner, is the player's home. There's only one home square. You can't click on it.
</li>
<li>Medium shade squares are active. A player selects one active square on their turn. (More below.)
</li>
<li>Light squares are inactive. They become active on a player's turn, after an active square is selected.</li>
</ul>
</li>
<li>When a player selects an active square, it "explodes". Effects:
<ul>
<li>The active square becomes empty.</li>
<li>A ray of inactive squares shoots up, down, left, right, and in the four diagonal directions.</li>
<li>Inactive square-rays stop when they hit an occupied square.</li>
<li>If the occupied square is a barrier or the player's color, the ray stops.</li>
<li>If the occupied square belongs to the opponent, the opponent's square is destroyed and becomes empty.</li>
</ul>
</li>
<li>When a player hits their opponent's home square. They win.</li>
</ul>
<script src="svg.min.js"></script>
<script src="kablamo.js"></script>
<script src="kablamo.strategies.js"></script>
<script src="kablamo.ui.js"></script>
</body>
</html>