Fix sudden death
This commit is contained in:
@@ -57,6 +57,11 @@ function updatePhase() {
|
||||
$('.card-button').css('visibility', 'hidden')
|
||||
$('#end-guessing-button').hide()
|
||||
}
|
||||
if(phase['name'] == 'need_more_hints_a' || phase['name'] == 'need_more_hints_b') {
|
||||
$('#enter-sudden-death-button').show()
|
||||
} else {
|
||||
$('#enter-sudden-death-button').hide()
|
||||
}
|
||||
if((phase['name'] == 'waiting_for_one_more_'+p) ||
|
||||
(phase[p+'-guessing'] &&
|
||||
(gc['end-guessing'] || (currentHint && currentGuessCount >= currentHint['wordCount'])))) {
|
||||
@@ -284,6 +289,9 @@ function pointCard(e) {
|
||||
function endGuessing(e) {
|
||||
socket.send('/app/end-guessing', wsHeaders, "")
|
||||
}
|
||||
function enterSuddenDeath(e) {
|
||||
socket.send('/app/enter-sudden-death', wsHeaders, "")
|
||||
}
|
||||
function onNewPhase(m) {
|
||||
phase = JSON.parse(m.body)
|
||||
updatePhase()
|
||||
@@ -332,6 +340,7 @@ function initialize() {
|
||||
$('#select-player-b').on('click', selectPlayer)
|
||||
$('#submit-hint button').on('click', submitHint)
|
||||
$('#end-guessing-button').on('click', endGuessing)
|
||||
$('#enter-sudden-death-button').on('click', enterSuddenDeath)
|
||||
|
||||
roomId = getRoomId()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user