Skip to content

Commit

Permalink
Merge pull request #360 from 1337isnot1337/main
Browse files Browse the repository at this point in the history
add a limit of answering question before vk
  • Loading branch information
geoffrey-wu authored Feb 15, 2025
2 parents c7ebe1f + 6e5083a commit 6750afd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions client/multiplayer/room.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ socket.onmessage = function (event) {
case 'mute-player': return mutePlayer(data);
case 'next': return next(data);
case 'no-questions-found': return noQuestionsFound(data);
case 'no-points-votekick-attempt': return failedVotekickPoints(data);
case 'owner-change': return ownerChange(data);
case 'pause': return pause(data);
case 'reveal-answer': return revealAnswer(data);
Expand Down Expand Up @@ -316,6 +317,11 @@ function connectionAcknowledgedTossup ({ tossup: currentTossup }) {
function endOfSet () {
window.alert('You have reached the end of the set');
}
function failedVotekickPoints ({ userId }) {
if (userId === USER_ID) {
window.alert('You can only votekick once you have answered a question correctly!');
}
}

function forceUsername ({ message, username }) {
window.alert(message);
Expand Down
Loading

0 comments on commit 6750afd

Please sign in to comment.