Compare commits
1 Commits
master
...
5b5210d5da
Author | SHA1 | Date | |
---|---|---|---|
5b5210d5da |
@@ -1,4 +1,4 @@
|
||||
FROM node:14
|
||||
FROM node:12
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
18
room.js
18
room.js
@@ -108,11 +108,9 @@ function reset(roomId) {
|
||||
room.canBuzz = true;
|
||||
|
||||
room.participants.forEach(p => {
|
||||
if (p.ws) {
|
||||
p.ws.send(JSON.stringify({
|
||||
type: "reset"
|
||||
}));
|
||||
}
|
||||
p.ws.send(JSON.stringify({
|
||||
type: "reset"
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -139,12 +137,10 @@ function updateScore(roomId, participantId, points) {
|
||||
|
||||
participant.score += points;
|
||||
|
||||
if (participant.ws) {
|
||||
participant.ws.send(JSON.stringify({
|
||||
type: "score",
|
||||
score: participant.score,
|
||||
}));
|
||||
}
|
||||
participant.ws.send(JSON.stringify({
|
||||
type: "score",
|
||||
score: participant.score,
|
||||
}));
|
||||
}
|
||||
|
||||
room.audience.forEach(ws => {
|
||||
|
@@ -65,7 +65,7 @@
|
||||
};
|
||||
|
||||
function beep() {
|
||||
if (window.navigator.vibrate) window.navigator.vibrate(500);
|
||||
window.navigator.vibrate(500);
|
||||
}
|
||||
|
||||
function updateScore(participantId, points) {
|
||||
|
Reference in New Issue
Block a user