Merge branch 'eh2011' of john:pentagameshow into eh2011
Conflicts: data.eh2011-1/100 data.eh2011-1/33
This commit is contained in:
commit
f23cd3c0aa
8
TODO
8
TODO
|
@ -41,3 +41,11 @@
|
|||
|
||||
= Server =
|
||||
* astro -( 0%)- vote fürs easterhegg
|
||||
|
||||
|
||||
= Hotfixes =
|
||||
DONE: nedap flush
|
||||
DONE: nedap encoding
|
||||
timeout sound
|
||||
DONE: irc+nedap auf 1. screen
|
||||
overload
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
<label for="playername4">Player 5:</label><input id="playername4"><br-->
|
||||
<input id="start" type="submit" value="▶">
|
||||
</form>
|
||||
|
||||
<p>
|
||||
http://94.45.252.44/
|
||||
—
|
||||
irc.hackint.eu #pentanews
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="game">
|
||||
|
|
|
@ -3,6 +3,7 @@ var wss = require('websocket-server');
|
|||
var ltx = require('ltx');
|
||||
|
||||
var WS_KEY = 'nedap-kneemFothbedchoadHietEnobKavLub1';
|
||||
var MIME_HTML = 'text/html; charset=UTF-8';
|
||||
|
||||
var backend, question, answers, scores;
|
||||
|
||||
|
@ -74,11 +75,11 @@ console.log({question:question,answers:answers})
|
|||
form.c('input', { type: 'submit',
|
||||
value: 'Submit' });
|
||||
|
||||
res.writeHead(200, { 'Content-type': 'text/html' });
|
||||
res.writeHead(200, { 'Content-type': MIME_HTML });
|
||||
res.write(html(form.toString()));
|
||||
res.end();
|
||||
} else {
|
||||
res.writeHead(404, { 'Content-type': 'text/html' });
|
||||
res.writeHead(404, { 'Content-type': MIME_HTML });
|
||||
res.write(html('<p>No question left on server.</p>'));
|
||||
res.end();
|
||||
}
|
||||
|
@ -92,22 +93,22 @@ console.log({question:question,answers:answers})
|
|||
scores[i]++;
|
||||
updateBackend();
|
||||
|
||||
res.writeHead(303, { 'Content-type': 'text/html',
|
||||
res.writeHead(303, { 'Content-type': MIME_HTML,
|
||||
'Location': '/thanks' });
|
||||
res.end();
|
||||
} else {
|
||||
res.writeHead(400, { 'Content-type': 'text/html',
|
||||
res.writeHead(400, { 'Content-type': MIME_HTML,
|
||||
'Location': '/' });
|
||||
res.end();
|
||||
}
|
||||
} else {
|
||||
res.writeHead(400, { 'Content-type': 'text/html' });
|
||||
res.writeHead(400, { 'Content-type': MIME_HTML });
|
||||
res.end();
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/thanks', function(req, res) {
|
||||
res.writeHead(200, { 'Content-type': 'text/html' });
|
||||
res.writeHead(200, { 'Content-type': MIME_HTML });
|
||||
res.write(html("<p>Thanks, your vote may have been counted.</p>"));
|
||||
res.end();
|
||||
});
|
||||
|
|
50
quiz.css
50
quiz.css
|
@ -31,9 +31,9 @@ p {
|
|||
.name {
|
||||
color: #7f7f7f;
|
||||
}
|
||||
.score {
|
||||
font-size: 66%;
|
||||
color: #ccc;
|
||||
#players .score {
|
||||
font-size: 88%;
|
||||
color: #fff;
|
||||
}
|
||||
.active {
|
||||
color: white;
|
||||
|
@ -41,9 +41,10 @@ p {
|
|||
}
|
||||
|
||||
#tier {
|
||||
color: white;
|
||||
color: #ddd;
|
||||
font-weight: bold;
|
||||
font-size: 150%;
|
||||
font-familiy: sans-serif;
|
||||
}
|
||||
#question {
|
||||
font-size: 250%;
|
||||
|
@ -51,6 +52,14 @@ p {
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#question img {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#question p {
|
||||
margin: 5px 40px 30px 40px;
|
||||
}
|
||||
|
||||
#nedap .url {
|
||||
text-decoration: underline;
|
||||
color: white;
|
||||
|
@ -68,30 +77,31 @@ p {
|
|||
|
||||
#answers {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
#answers ul {
|
||||
margin: 0.5em 0.5em;
|
||||
text-align: center;
|
||||
}
|
||||
#answers ul li {
|
||||
#answers ul li {
|
||||
color: #ddd;
|
||||
width: 30%;
|
||||
padding: 0.1em 0.5em;
|
||||
border: 0.2em solid #ccc;
|
||||
border-radius: 1em;
|
||||
border: 0.15em solid #ddd;
|
||||
border-radius: 0.85em 0.85em 1em 1em;
|
||||
}
|
||||
|
||||
.selected {
|
||||
#answers ul li.selected {
|
||||
background-color: #ff9600;
|
||||
color: black;
|
||||
}
|
||||
.right {
|
||||
#answers ul li.right {
|
||||
background-color: #06ff00;
|
||||
color: black;
|
||||
}
|
||||
.wrong {
|
||||
background-color: #e01000;
|
||||
#answers ul li.wrong {
|
||||
background-color: #ff0600;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
@ -126,11 +136,17 @@ ul#tiers li.done {
|
|||
width: 20em;
|
||||
text-align: left;
|
||||
margin: 1em auto;
|
||||
font-size: 200%;
|
||||
font-size: 175%;
|
||||
}
|
||||
#scoreboard dl dd {
|
||||
margin-left: 4em;
|
||||
margin-bottom: 0.65em;
|
||||
}
|
||||
#scoreboard dl dd .score {
|
||||
font-size: 125%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#scoreboard dl dd img {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
@ -139,11 +155,11 @@ ul#tiers li.done {
|
|||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 0.01em;
|
||||
padding: 0.05em;
|
||||
margin: 0.05em 0.2em;
|
||||
padding: 0px;
|
||||
width: 1.6em;
|
||||
border: 0.1em solid #ccc;
|
||||
border-radius: 0.2em;
|
||||
border: 0.1em solid #ddd;
|
||||
border-radius: 0.25em 0.25em 0.35em 0.35em;
|
||||
font-weight: bold;
|
||||
font-size: 300%;
|
||||
text-align: center;
|
||||
|
|
9
quiz.js
9
quiz.js
|
@ -281,6 +281,7 @@ function takeJoker(activePlayer, joker) {
|
|||
console.log('scores: '+JSON.stringify(scores));
|
||||
redraw();
|
||||
};
|
||||
redraw();
|
||||
}
|
||||
if (joker === 'irc') {
|
||||
sendToBackend({ irc: "activate" });
|
||||
|
@ -467,13 +468,13 @@ function switchToGame() {
|
|||
} else if (keyCode === 13) {
|
||||
switchToAnswer();
|
||||
} else if (activePlayer !== null &&
|
||||
key === 'q') {
|
||||
key === 'f') {
|
||||
takeJoker(activePlayer, 'fiftyfifty');
|
||||
} else if (activePlayer !== null &&
|
||||
key === 'w') {
|
||||
key === 'z') {
|
||||
takeJoker(activePlayer, 'audience');
|
||||
} else if (activePlayer !== null &&
|
||||
key === 'e') {
|
||||
key === 'p') {
|
||||
takeJoker(activePlayer, 'phone');
|
||||
} else if (activePlayer !== null &&
|
||||
key === 'n') {
|
||||
|
@ -482,7 +483,7 @@ function switchToGame() {
|
|||
key === 'i') {
|
||||
takeJoker(activePlayer, 'irc');
|
||||
} else if (activePlayer !== null &&
|
||||
key === 'f') {
|
||||
key === 's') {
|
||||
takeJoker(activePlayer, 'fwd');
|
||||
activePlayer = null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user