Start timing work
This commit is contained in:
parent
ce2ba12ec0
commit
b29415a0d7
@ -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)
|
||||
|
||||
|
@ -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 = {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user