Merge branch 'master' of astrom.hq.c3d2.de:ds-quiz
This commit is contained in:
commit
90973c04d4
1
TODO
1
TODO
|
@ -11,6 +11,7 @@
|
|||
quiz.js: TIMER_ANSWER
|
||||
* astro -(100%)- Auflösung: Bei der Auflösung der Frage, kann ein Bild/Film angezeigt werden.
|
||||
Feld "explanation" in questions.json
|
||||
* astro -( 0$)- Sound Effects: Rewind before Play
|
||||
|
||||
= Joker =
|
||||
5 Joker sollten reichen.
|
||||
|
|
|
@ -1,7 +1,26 @@
|
|||
|
||||
Epeleptiker mit animierten Gifs angegriffen
|
||||
Epileptiker mit animierten Gifs angegriffen
|
||||
http://royal.pingdom.com/2010/12/21/the-major-incidents-on-the-internet-in-2010/
|
||||
|
||||
What App did Apple not censor?
|
||||
Wikileaks http://bits.blogs.nytimes.com/2010/12/21/why-apple-removed-wikileaks-app-from-its-store/
|
||||
|
||||
Who is Little Bobby Tables in the real world?
|
||||
image: http://xkcd.com/327/
|
||||
Sex Offender from Oklahoma: http://www.schneier.com/blog/archives/2008/04/oklahoma_data_l.html
|
||||
Voter from Sweden: http://www.wired.co.uk/news/archive/2010-09/24/sweden-election-hack
|
||||
?
|
||||
?
|
||||
|
||||
How many errors did Office 2007 score at the OOXML test?
|
||||
0
|
||||
2
|
||||
13
|
||||
122,000: http://tech.slashdot.org/tech/08/04/21/1821251.shtml
|
||||
|
||||
What is the coolest Hackerspace in Germany?
|
||||
C3D2 HQ
|
||||
Sublab
|
||||
CCCB
|
||||
Entropia
|
||||
http://christiankoch.de/sublab/public/wasserbruch/
|
||||
|
|
10
index.html
10
index.html
|
@ -12,11 +12,11 @@
|
|||
<h1>Pentanews<br>Game Show</h1>
|
||||
|
||||
<form>
|
||||
<label for="playername0">Kandidat 1:</label><input id="playername0"><br>
|
||||
<label for="playername1">Kandidat 2:</label><input id="playername1"><br>
|
||||
<label for="playername2">Kandidat 3:</label><input id="playername2"><br>
|
||||
<label for="playername3">Kandidat 4:</label><input id="playername3"><br>
|
||||
<label for="playername4">Kandidat 5:</label><input id="playername4"><br>
|
||||
<label for="playername0">Player 1:</label><input id="playername0"><br>
|
||||
<label for="playername1">Player 2:</label><input id="playername1"><br>
|
||||
<label for="playername2">Player 3:</label><input id="playername2"><br>
|
||||
<!--label for="playername3">Player 4:</label><input id="playername3"><br>
|
||||
<label for="playername4">Player 5:</label><input id="playername4"><br-->
|
||||
<input id="start" type="submit" value="▶">
|
||||
</form>
|
||||
</div>
|
||||
|
|
19
quiz.js
19
quiz.js
|
@ -121,7 +121,7 @@ Timer.prototype.clear = function() {
|
|||
$('#timer').removeClass('elapsed');
|
||||
$('#timer').hide();
|
||||
};
|
||||
var TIMER_QUESTION = 90;
|
||||
var TIMER_QUESTION = 60;
|
||||
var TIMER_ANSWER = 60;
|
||||
var timer = new Timer();
|
||||
|
||||
|
@ -314,6 +314,9 @@ function setQuestionContents(q) {
|
|||
}
|
||||
}
|
||||
|
||||
var PLAYER_KEYS = 'abc';
|
||||
var ANSWER_KEYS = '1234';
|
||||
|
||||
// Game screen is the one with the question in question
|
||||
function switchToGame() {
|
||||
var i, q = questions[currentQuestion];
|
||||
|
@ -349,6 +352,7 @@ function switchToGame() {
|
|||
if (isRight) {
|
||||
playerScores[activePlayer] += q.tier;
|
||||
|
||||
$('#audio_right')[0].currentTime = 0;
|
||||
$('#audio_right')[0].play();
|
||||
} else {
|
||||
playerScores[activePlayer] -= q.tier;
|
||||
|
@ -367,8 +371,10 @@ function switchToGame() {
|
|||
playerScores[i] -= q.tier;
|
||||
}
|
||||
}
|
||||
if (!isTimeout)
|
||||
if (!isTimeout) {
|
||||
$('#audio_wrong')[0].currentTime = 0;
|
||||
$('#audio_wrong')[0].play();
|
||||
}
|
||||
}
|
||||
updateScores();
|
||||
timer.halt();
|
||||
|
@ -394,6 +400,7 @@ function switchToGame() {
|
|||
};
|
||||
};
|
||||
var timeout = function() {
|
||||
$('#audio_timeout')[0].currentTime = 0;
|
||||
$('#audio_timeout')[0].play();
|
||||
switchToAnswer(true);
|
||||
};
|
||||
|
@ -405,21 +412,21 @@ function switchToGame() {
|
|||
$('#game').hide();
|
||||
switchToScoreboard();
|
||||
} else if (activePlayer === null &&
|
||||
"abcde".indexOf(key) >= 0) {
|
||||
PLAYER_KEYS.indexOf(key) >= 0) {
|
||||
// No active player before, but somebody hit a button!
|
||||
var player = "abcde".indexOf(key);
|
||||
var player = PLAYER_KEYS.indexOf(key);
|
||||
if (playerNames[player]) {
|
||||
activePlayer = player;
|
||||
updateTier();
|
||||
timer.set(TIMER_ANSWER, timeout);
|
||||
}
|
||||
} else if (activePlayer !== null &&
|
||||
"1234".indexOf(key) >= 0) {
|
||||
ANSWER_KEYS.indexOf(key) >= 0) {
|
||||
// player pronounced the answer
|
||||
if (choice !== null)
|
||||
$('#answer' + choice).removeClass('selected');
|
||||
|
||||
choice = "1234".indexOf(key);
|
||||
choice = ANSWER_KEYS.indexOf(key);
|
||||
$('#answer' + choice).addClass('selected');
|
||||
} else if (activePlayer !== null &&
|
||||
keyCode === 13) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user