did a little cleanup

This commit is contained in:
Samuel Kent
2023-01-10 18:50:56 +11:00
parent c8db4aef17
commit 42307049d9
6 changed files with 1 additions and 27 deletions
-12
View File
@@ -1,4 +1,3 @@
const http = require('http');
const express = require('express');
const app = express();
@@ -55,12 +54,6 @@ io.on("connection", (socket) => {
buzzOrder: buzzInfo.length+1
});
io.emit("buzzInfoToClient", buzzInfo);
// function buzzInfoToclient() {
// io.emit("buzzInfoToClient", buzzInfo);
// console.log(buzzInfo);
// }
// setTimeout(buzzInfoToclient, 1000);
// console.log(buzzInfo);
});
socket.on("scoresToServer", score => {
@@ -68,8 +61,6 @@ io.on("connection", (socket) => {
if (teamsScore[currentTeamNumber] >= 2) {
teamsScore[currentTeamNumber] = 0;
currentTeamNumber = (currentTeamNumber+1)%2;
// io.emit("switchCurrentteam");
// io.emit("dataToClient", buzzList, teamsList[currentTeamNumber], teamsScore[currentTeamNumber]);
}
buzzInfo = [];
io.emit("gameStateToClient", teamsList[currentTeamNumber], teamsScore[currentTeamNumber]);
@@ -77,8 +68,6 @@ io.on("connection", (socket) => {
io.emit("userInfoToClient", userInfo);//resets the buzzer info
});
socket.on("updateUserInfo", (userName, teamName, buzzerId) => {
userInfo[userName] = {
teamName: teamName,
@@ -88,7 +77,6 @@ io.on("connection", (socket) => {
});
socket.on("unregisterUsers", () => {
// console.log("whaat?");
userInfo = new Object();
io.emit("userInfoToClient", userInfo);
});
-2
View File
@@ -21,8 +21,6 @@ function buzzInfoToClient(buzzInfo) {
if ($("#firstBuzz").html() == "") {
$("#firstBuzz").html(buzzInfo[0].userName);
const userId = buzzInfo[0].userName.replaceAll(" ","_");
// $("#userListPanel").find("#"+userId).css("font-weight", 900);
// $("#userListPanel").find("#"+userId).find("var").html(" (BUZZ)");
let buzzerId = $("#userListPanel").find("#"+userId).find("img").attr("data-buzzerId")
let buzzerSound = new Audio(buzzerId+".wav");
buzzerSound.play();
-2
View File
@@ -3,9 +3,7 @@
<head>
<title>The cooler buzzer website</title>
<link rel="stylesheet" href="styleMain.css">
<!-- <link rel="preload" href="Twoson.woff2" as="font" type="font/woff2" crossorigin> -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- <script src="https:/socket.io/socket.io.js"></script> -->
<script>
$(document).ready(function() {
const okSsuka = new Audio('OkSsuka.wav');
-4
View File
@@ -3,7 +3,6 @@
<head>
<title>The cooler buzzer website</title>
<link rel="stylesheet" href="styleMain.css">
<!-- <link rel="preload" href="Twoson.woff2" as="font" type="font/woff2" crossorigin> -->
<script src="browserFunctions.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="http:/socket.io/socket.io.js"></script>
@@ -66,7 +65,6 @@
<button id="plus1" type="button" style="width: 110px; height: 50px;">+1 Point</button>
<button id="plus2" type="button" style="width: 110px; height: 50px;">+2 Points</button>
<p style="font-size: 11px; margin: 5px;">(all points buttons clear buzzers)</p>
<!-- <br> -->
<p id="firstBuzz"></p>
<p id="objection">
</p>
@@ -75,8 +73,6 @@
<br>
<br>
<button id="unregisterUsers" type="button" style="height: 30px;">Remove all players</button>
<!-- <input type="text" id="bufferInput" placeholder="Buffer"> -->
</div>
<div id="userListPanel">
<div id="PlayersList">
-2
View File
@@ -3,7 +3,6 @@
<head>
<title>The cooler buzzer website</title>
<link rel="stylesheet" href="styleMain.css">
<!-- <link rel="preload" href="Twoson.woff2" as="font" type="font/woff2" crossorigin> -->
<script src="browserFunctions.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="http:/socket.io/socket.io.js"></script>
@@ -142,6 +141,5 @@
(please use sparingly)
</p>
<div>
</body>
</html>
+1 -5
View File
@@ -1,5 +1,3 @@
body {
font-family: 'Twoson';
color: rgb(255, 255, 255);
@@ -32,7 +30,6 @@ a, a:visited {
min-height: 310px;
width: 500px;
position: relative;
/* bottom: 150px; */
}
#objection img{
@@ -47,6 +44,7 @@ a, a:visited {
text-align: center;
width: 200px;
}
#contestAnswer img {
width: 100px;
}
@@ -71,7 +69,6 @@ a, a:visited {
}
#PlayersList {
/* font-family: "Lucida Console"; */
position: absolute;
left: 60px;
border: dashed;
@@ -145,7 +142,6 @@ ul {
#objection img{
width: 150px;
/* text-align: left; */
}
#userListPanel {
top: 80px;