{% extends "game.html" %} {% block game_content %}

Lobby

{% csrf_token %}

Access Code: {{ access_code }}

Options

{{ form.as_ul }}
{% if is_observer %} Leave {% else %} {% endif %}
{% endblock %} {% block game_handle_new_status %} if(oldStatus.game_phase == newStatus.game_phase) { if(JSON.stringify(oldStatus.players) != JSON.stringify(newStatus.players)) { lobby_list = document.getElementById('players-in-lobby'); $(lobby_list).empty(); newStatus.players.forEach(function(name) { var el = document.createElement('li'); el.innerText = name; if(name == '{{ player.name }}') { el.className = 'this-player'; } lobby_list.appendChild(el); }); statusObj.players = newStatus.players; } if(JSON.stringify(oldStatus.rounds) != JSON.stringify(newStatus.rounds)) { for(var i = 1; i <= 5; i++) { document.getElementById('score-box-' + i).innerText = newStatus.rounds[i - 1]; } statusObj.rounds = newStatus.rounds; } return true; } else { return false; } {% endblock %}