-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
155 lines (138 loc) · 5.54 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mancala</title>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lobster&display=swap">
<!-- JAVASCRIPT FILES -->
<script src="game/game.js" defer></script>
<script src="./modules/requests.js" defer></script>
<script src="game/utils.js" defer></script>
<script src="game/bot.js" defer></script>
<script src="game/elements.js" defer></script>
</head>
<body>
<h1 id="main_title">Mancala</h1>
<p><a href="#jogo">Jogo</a><p>
<div id="header">
<div>
<button id="open" class="button">
Rules
</button>
<div class="modal-container" id="modal_container">
<div class="modal">
<h1> Rules </h1>
<p> Cada jogador controla as cavidades do seu lado</p>
<p> No início do jogo, os armazéns estão vazios</p>
<p> As restantes cavidades têm o mesmo número de sementes</p>
<p> Para semear, o jogador pega em todas as sementes de uma das suas cavidades e distribui-as pelas seguintes</p>
<p> Cada cavidade seguinte fica com mais uma semente</p>
<p> Semeadura é feita no sentido anti-horário</p>
<p> Se se passar pelo armazém do oponente, não se semeia, continua-se para a próxima cavidade</p>
<p> Se for o seu armazém, semear também</p>
<p> Se a última semente for semeada no seu armazém, pode voltar a jogar</p>
<p> Se a última semente for semeada numa sua cavidade vazia, pode recolher essa semente e todas as sementes da cavidade oposta do seu adversário</p>
<p> O jogo termina quando um dos jogadores ficar sem sementesnas suas cavidades</p>
<p> O outro jogador recolhe as sementes que sobraram do seu lado</p>
<p>Ganha quem tiver mais sementes no seu armazém</p>
<button id="close" class="button">
Close
</button>
</div>
</div>
</div>
<fieldset id="login_form" class="modal">
<label for="username">Username: </label>
<input type="text" placeholder="Enter username" name="username" autocomplete="on" id="username">
<label for="password">Password: </label>
<input type="password" placeholder="Enter password" name ="password" id="password" autocomplete="off" required>
<button class="button" id="login">Login</button>
</fieldset>
<div id="loggedUser" hidden></div>
<button class="button" id="logout" onClick="location.reload()" hidden>Logout</button>
<!-- </div> -->
</div>
<br>
<div id="config">
<div class="general" id="n_sem">
<p>Número de sementes: </p>
<select class="option" id="num_sementes_op">
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</div>
<div class="general" id="n_cav">
<p>Número de cavidades: </p>
<select class="option" id="num_cavidades_op">
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</div>
<div class="general" id="n_pl">
<p>Número de jogadores: </p>
<select class="option" id="num_players_op">
<option value="1">1</option>
<option value="2" selected>2</option>
</select>
</div>
<div class="general" id="start">
<p>Quem começa: </p>
<select class="option" id="starting_op">
<option value="player1">Player1</option>
<option value="player2">Player2 (ou bot)</option>
</select>
</div>
<div class="general" id="bot_level">
<p>Nível do bot: </p>
<select class="option" id="bot_level_op">
<option value="easy">Fácil</option>
<option value="hard">Difícil</option>
</select>
</div>
<div class="config">
<button class="button start_button" id="refresh">Start</button>
<!-- onClick="window.location.reload();" -->
</div>
</div>
<br>
<div id="delete">
Show seed numbers: <br>
</div>
<div id="jogo">
<div id="tabuleiro">
<div id="left_space"></div>
<div class="cavidade_space">
<div id="up_side">
</div>
<div id="down_side">
</div>
</div>
<div id="right_space"></div>
</div>
<br><br>
<div id="extra">
<button class="button" id="scores">Classifições</button>
<div class="modal-container" id="modal_container2">
<div class="modal" id="format">
<h1>Classificações</h1>
<table id="tab">
</table>
<button id="close-rankings" class="button">
Close
</button>
</div>
</div>
<button class="button" id="giveup">Desistir</button>
</div>
<div id="addHere"></div>
</div>
<p>Go back to the <a href="#top">top</a></p>
<div id="messages"></div>
</body>
</html>