-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
362 lines (321 loc) · 15.9 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<meta name="theme-color" content="#D9534F">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="vue.min.js"></script>
<title>Secret Hitler</title>
<link rel="icon" href="icon.png">
<style>
#app {
font-family: 'Roboto Mono', monospace;
}
#top_bar {
padding-top: 15px;
font-size: 18px;
}
.btn {
font-family: 'Roboto Mono', monospace;
font-weight: 700;
}
h2 {
font-size: 250%;
}
p {
text-align: center;
font-weight: 700;
font-size: x-small;
}
#main_menu {
max-width: 425px;
min-width: 370px;
}
#main {
max-width: 600px;
min-width: 370px;
}
#standard {
padding-top: 10px;
}
#rt_size {
font-size: 300%;
margin: 10px;
padding-top: 15%;
width: 315px;
height: 185px;
}
#role_text {
border: 5px solid #f7f7f9;
font-size: 300%;
margin: 10px;
padding-top: 15%;
width: 315px;
height: 185px;
}
#role_text_blank {
border: 5px solid #f7f7f9;
margin: 10px;
width: 315px;
height: 185px;
}
#next_button {
padding-top: 10px;
}
#enter_btn {
margin-left: 10px;
}
#inputplayers {
border: 4px solid #f7f7f9;
border-radius: 3px;
padding: 25px;
}
#actions_box {
border: 4px solid #f7f7f9;
border-radius: 3px;
padding: 15px;
}
.container-fluid {
margin: 3px;
}
#f_slot {
border: 2px solid #82121b;
height: 85px;
width: 100%;
border-radius: 3px;
padding-top: 5px;
}
#l_slot {
border: 2px solid #002752;
height: 65px;
width: 100%;
padding-top: 5px;
border-radius: 4px;
margin-bottom: 15px;
}
#policies {
padding: 25px;
margin-left: 3px;
margin-right: 4px;
background: white;
}
#fascist_slots {
padding: 0px;
margin-bottom: 20px;
}
#liberal_slots {
padding: 0px;
}
#discard_text {
margin-top: 20px;
margin-bottom: 10px;
}
#num_policies_left {
margin-top: 20px;
}
.l_filled {
background-color: #B8DAFF;
}
.f_filled {
background-color: #F8D7DA;
}
#help {
margin-top: 15px;
}
.l_color {
color: #002752;
}
.f_color {
color: #82121b;
}
.h_color {
color: #ba7415;
}
</style>
</head>
<body>
<div id="app">
<div class="d-flex justify-content-center" id="top_bar">
<b>secrethitler.xyz</b>
</div>
<div class="d-flex justify-content-center" style="padding-top: 10px">
<div class="container-fluid" id="main_menu" v-show="show_inputplayers">
<div class="container-fluid" id="inputplayers" v-show="show_inputplayers">
<div class="d-flex justify-content-center"><h4><b>Number of Players</b></h4></div>
<div class="d-flex justify-content-center" id="standard">
<button type="button" class="btn btn-outline-danger btn-lg" id="enter_btn" @click="start_5">Five</button>
<button type="button" class="btn btn-outline-danger btn-lg" id="enter_btn" @click="start_6">Six</button>
<button type="button" class="btn btn-outline-danger btn-lg" id="enter_btn" @click="start_7">Seven</button>
</div>
<div class="d-flex justify-content-center" id="standard">
<button type="button" class="btn btn-outline-danger btn-lg" id="enter_btn" @click="start_8">Eight</button>
<button type="button" class="btn btn-outline-danger btn-lg" id="enter_btn" @click="start_9">Nine</button>
<button type="button" class="btn btn-outline-danger btn-lg" id="enter_btn" @click="start_10">Ten</button>
</div>
</div>
<div class="container-fluid" id="help">
<p class="small" style="margin-bottom: 10px">Secret Hitler is a social deduction game for 5–10 people about finding and stopping the Secret Hitler. The majority of players are liberals. If they can learn to trust each other, they have enough votes to control the table and win the game. But some players are fascists. They will say whatever it takes to get elected, enact their agenda, and blame others for the fallout. The liberals must work together to discover the truth before the fascists install their cold-blooded leader and win the game.</br></br>This handles assigning random roles, drawing random cards and keeping track of the board, on one mobile device. It is meant to replace the physical requirements of Secret Hitler but keep the social, real life aspect of the game. Electing, voting, investigating, killing and all other social decisions are not included in order to maintain the spirit of the game.</p>
<p><b><a href="https://github.com/trentpiercy/secret-hitler" target="_blank"><img src="github-icon.png" height="32" width="32"></img></a></b></p>
<hr>
<p class="small"><b>Credit <a href="http://secrethitler.com" target="_blank">secrethitler.com</a></br>Creative Commons BY-NC-SA 4.0</b></p>
</p>
</div>
</div>
<div class="container-fluid" id="roles" v-show="show_roles">
<div class="container-fluid" id="rolecard" v-show="show_flip">
<div class="card card-inverse mb-3 text-center" id="rt_size" style="background-color: white; color: black;" @click="flip"></div>
<div class="d-flex justify-content-center" id="next_button">
<button type="button" class="btn btn-outline-secondary btn-lg" @click="flip">Flip</button>
</div>
</div>
<div class="container-fluid" id="rolecard" v-show="show_rolecard">
<div class="card card-inverse mb-3 text-center" id="rt_size" style="background-color: white;" v-bind:class="{ f_color : (role=='Fascist'), l_color : (role=='Liberal'), h_color : (role=='Hitler'), 'card-primary' : (role=='Liberal'), 'card-danger' : (role=='Fascist'), 'card-warning' : (role=='Hitler') }" @click="next_role"><b>{{role}}</b></div>
<div class="d-flex justify-content-center" id="next_button">
<button type="button" class="btn btn-outline-success btn-lg" @click="next_role">Next Card</button>
</div>
</div>
</div>
</div>
<div class="d-flex justify-content-center">
<div class="container-fluid" id="main" v-show="show_main" style="padding: 1px;">
<div class="container-fluid" id="liberal_slots">
<div class="d-flex justify-content-center">
<div class="container-fluid" id="l_slot" v-bind:class="{ l_filled : liberal_slots[0] }"></div>
<div class="container-fluid" id="l_slot" v-bind:class="{ l_filled : liberal_slots[1] }"></div>
<div class="container-fluid" id="l_slot" v-bind:class="{ l_filled : liberal_slots[2] }"></div>
<div class="container-fluid" id="l_slot" v-bind:class="{ l_filled : liberal_slots[3] }"></div>
<div class="container-fluid" id="l_slot" v-bind:class="{ l_filled : liberal_slots[4] }">
<p>Liberals Win</p>
</div>
</div>
</div>
<div class="container-fluid" id="fascist_slots" v-if="show_fascist_5_6">
<div class="d-flex justify-content-center">
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[0] }"></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[1] }"></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[2] }">
<p>President examines top 3 cards</p></div>
</div>
<div class="d-flex justify-content-center">
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[3] }">
<p>President must kill player</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[4] }">
<p>President must kill player. Veto unlocked</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[5] }"><p>Fascists Win</p></div>
</div>
</div>
<div class="container-fluid" id="fascist_slots" v-if="show_fascist_7_8">
<div class="d-flex justify-content-center">
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[0] }"></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[1] }">
<p>President investigates an identity</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[2] }">
<p>President chooses next President</p></div>
</div>
<div class="d-flex justify-content-center">
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[3] }">
<p>President must kill player</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[4] }">
<p>President must kill player. Veto unlocked</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[5] }"><p>Fascists Win</p></div>
</div>
</div>
<div class="container-fluid" id="fascist_slots" v-if="show_fascist_9_10">
<div class="d-flex justify-content-center">
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[0] }">
<p>President investigates an identity</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[1] }">
<p>President investigates an identity</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[2] }">
<p>President chooses next President</p></div>
</div>
<div class="d-flex justify-content-center">
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[3] }">
<p>President must kill player</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[4] }">
<p>President must kill player. Veto unlocked</p></div>
<div class="container-fluid" id="f_slot" v-bind:class="{ f_filled : fascist_slots[5] }"><p>Fascists Win</p></div>
</div>
</div>
<div class="container-fluid" id="actions_box">
<div class="container-fluid" v-show="show_chancellor_confirm">
<div class="d-flex justify-content-center">
<h3><b>Choose Chancellor</b></h3>
</div>
<div class="d-flex justify-content-center">
<button type="button" class="btn btn-outline-info btn-lg" @click="confirm_chancellor">Confirm</button>
</div>
<div class="d-flex justify-content-center mt-1">
<button type="button" class="btn btn-outline-danger" @click="fail_vote">{{num_failed_votes}} Failed Votes</button>
</div>
<div class="d-flex justify-content-center" id="num_policies_left">
<h6><b><font color="#5CB85C">{{num_policies_left}}</font> Policies Left in Draw Pile</b></h6>
</div>
<div class="d-flex justify-content-center" id="num_policies_left" style="margin-top: -5px">
<h6><b><font color="#D9534F">{{num_policies_discarded}}</font> Policies in Discard</b></h6>
</div>
</div>
<div class="container-fluid" v-show="show_draw">
<div class="d-flex justify-content-center">
<button type="button" class="btn btn-outline-success btn-lg" @click="draw_3">Draw 3</button>
</div>
<div class="d-flex justify-content-center" id="num_policies_left">
<h6><b><font color="#5CB85C">{{num_policies_left}}</font> Policies Left in Draw Pile</b></h6>
</div>
<div class="d-flex justify-content-center" id="num_policies_left" style="margin-top: -5px">
<h6><b><font color="#D9534F">{{num_policies_discarded}}</font> Policies in Discard</b></h6>
</div>
</div>
<div class="container-fluid" v-if="show_shuffle">
<div class="d-flex justify-content-center">
<button type="button" class="btn btn-outline-info btn-lg" @click="randomize_policies">Shuffle Deck</button>
</div>
<div class="d-flex justify-content-center" id="num_policies_left">
<h6><b><font color="#5CB85C">{{num_policies_left}}</font> Policies Left in Draw Pile</b></h6>
</div>
<div class="d-flex justify-content-center" id="num_policies_left" style="margin-top: -5px">
<h6><b><font color="#D9534F">{{num_policies_discarded}}</font> Policies in Discard</b></h6>
</div>
</div>
<div class="d-flex justify-content-center" v-if="show_policies" id="discard_text"><h3><b>Tap to <font color="#500000">Discard</font></b></h3></div>
<div class="d-flex justify-content-center" v-if="show_policies">
<div class="card card-inverse mb-3 text-center" id="policies" v-show="show_policy_1" v-bind:class="{ f_color : (drawn_policies[0]=='Fascist'), l_color : (drawn_policies[0]=='Liberal'), '' : (drawn_policies[0]=='Liberal'), '' : (drawn_policies[0]=='Fascist') }" @click="discard_1"><b>{{drawn_policies[0]}}</b></div>
<div class="card card-inverse mb-3 text-center" id="policies" v-show="show_policy_2" v-bind:class="{ f_color : (drawn_policies[1]=='Fascist'), l_color : (drawn_policies[1]=='Liberal'), '' : (drawn_policies[1]=='Liberal'), '' : (drawn_policies[1]=='Fascist') }" @click="discard_2"><b>{{drawn_policies[1]}}</b></div>
<div class="card card-inverse mb-3 text-center" id="policies" v-show="show_policy_3" v-bind:class="{ f_color : (drawn_policies[2]=='Fascist'), l_color : (drawn_policies[2]=='Liberal'), '' : (drawn_policies[2]=='Liberal'), '' : (drawn_policies[2]=='Fascist') }" @click="discard_3"><b>{{drawn_policies[2]}}</b></div>
</div>
<div class="container-fluid" v-if="show_policies">
<div class="d-flex justify-content-center" @click="veto" v-if="show_veto">
<button type="button" class="btn btn-outline-danger btn-lg" style="margin-top: 10px;" @click="veto">Veto</button>
</div>
</div>
<div class="d-flex justify-content-center" v-if="show_liberal_win">
<div class="container-fluid">
<h3><b><font color="#002752">Liberals Win!</font></b></h3><p class="small">Refresh to play again!</p>
</div>
</div>
<div class="d-flex justify-content-center" v-if="show_fascist_win">
<div class="container-fluid">
<h3><b><font color="#82121b">Fascists Win!</font></b></h3><p class="small">Refresh to play again!</p>
</div>
</div>
<div class="d-flex justify-content-center" v-if="show_examine_all">
<div class="d-flex justify-content-center" v-if="show_examine1" @click="show_next_examine" style="margin-top: 15px;">
<p><h4><b>Examine next 3 policy cards</b></h4></p>
</div>
<div class="container-fluid" v-if="show_examine2" @click="dismiss_examine" style="margin-top: 15px;">
<div class="d-flex justify-content-center"><h4><b>Dismiss Cards</b></h4></div>
<div class="d-flex justify-content-center">
<div class="card card-inverse mb-3 text-center" id="policies" v-bind:class="{ f_color : (policies_list[0]=='Fascist'), l_color : (policies_list[0]=='Liberal'), '' : (policies_list[0]=='Liberal'), '' : (policies_list[0]=='Fascist') }"><b>{{policies_list[0]}}</b></div>
<div class="card card-inverse mb-3 text-center" id="policies" v-bind:class="{ f_color : (policies_list[1]=='Fascist'), l_color : (policies_list[1]=='Liberal'), '' : (policies_list[1]=='Liberal'), '' : (policies_list[1]=='Fascist') }"><b>{{policies_list[1]}}</b></div>
<div class="card card-inverse mb-3 text-center" id="policies" v-bind:class="{ f_color : (policies_list[2]=='Fascist'), l_color : (policies_list[2]=='Liberal'), '' : (policies_list[2]=='Liberal'), '' : (policies_list[2]=='Fascist') }"><b>{{policies_list[2]}}</b></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="app.js"></script>
</html>