Start timing work

This commit is contained in:
Dane Johnson 2023-02-15 15:05:20 -06:00
parent ce2ba12ec0
commit b29415a0d7
2 changed files with 14 additions and 1 deletions

View File

@ -33,6 +33,14 @@ def on_join_contestant(data):
'signature': signature}, to=session.room)
@socketio.on('buzz')
def on_buzz():
contestant = session.game[request.sid]
if contestant.locked:
return
emit('contestant-buzzed', {'sid': request.sid}, to=session.room)
# Host
@socketio.on('host-join')
def on_join_host(data):
@ -65,6 +73,11 @@ def on_activate_clue(data):
emit('active-clue', match, to=session.room)
@socketio.on('start-clue-clock')
def on_start_clue_clock():
emit('clue-clock-on', to=session.room)
def main():
socketio.run(app, host='0.0.0.0', debug=True)

View File

@ -8,7 +8,7 @@ MAX_CATEGORIES = 28100
class Game:
def __init__(self, code):
self.code = code
self.locked = True
self.locked = False
self.players = {}
self.categories = {}