diff --git a/html/index.html b/html/index.html index 8b86528..7d3a786 100644 --- a/html/index.html +++ b/html/index.html @@ -188,6 +188,7 @@ socket.on("PICK", function(data){ page += "
"; page += "

Select the line you prefer.

"; + page += ""; for(y=0; y { // PICK socket.on("PICK", (id) => { // When received pick form player + + // Check if not my entry + if(userWrite[userSockets.indexOf(socket)] == submissions[id]){ + socket.emit("PICK_REPLY", {error:"You can't vote for your own submission!"}); + return; + } + + // Add to list userPick[userSockets.indexOf(socket)] = id; // Perform ok