-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
84 lines (84 loc) · 2.91 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mancala</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Mancala</h1>
</header>
<main>
<section class="rules">
<h2 class="rules__heading">Rules:</h2>
<ul>
<li class="rules__list">
Once the player is chosen, they can select any pit from their side to play.
</li>
<li class="rules__list">
After the pit selection, all the numbers from that pit will be used to fill
the other pits including player's own score pit while moving counter-clockwise.
</li>
<li class="rules__list">
The chosen player will keep playing in this fashion until their last pit has digit "1".
If it happens then, other player will get the chance to choose a pit and play.
</li>
<li class="rules__list">
Once either of the players' entire pits get empty, then whoever has the most number
in their score pit will be the winner.
</li>
</ul>
</section>
<section class="rules">
<h2 class="rules__heading">Instructions:</h2>
<ul>
<li class="rules__list">
Use Left(<) / Right(>) arrow to move over pits and Enter to select the pit.
</li>
</ul>
</section>
<div class="area">
<div class="meta">
<section class="meta__turn">
<h3>Turn:</h3>
<div id="turn"></div>
</section>
<section class="meta__turn">
<h3>Count:</h3>
<div id="count"></div>
</section>
<button>Restart</button>
</div>
<section class="game">
<h3>Player 1</h3>
<div class="game__board">
<div class="game__score" id="player-1-score"></div>
<div>
<div class="game__pits" id="player-1-pits">
<div id="player-1-pit-0"></div>
<div id="player-1-pit-1"></div>
<div id="player-1-pit-2"></div>
<div id="player-1-pit-3"></div>
<div id="player-1-pit-4"></div>
<div id="player-1-pit-5"></div>
</div>
<div class="game__pits" id="player-2-pits">
<div id="player-2-pit-0"></div>
<div id="player-2-pit-1"></div>
<div id="player-2-pit-2"></div>
<div id="player-2-pit-3"></div>
<div id="player-2-pit-4"></div>
<div id="player-2-pit-5"></div>
</div>
</div>
<div class="game__score" id="player-2-score"></div>
</div>
<h3>Player 2</h3>
</section>
</div>
</main>
<script src="main.js"></script>
</body>
</html>