[Client] Fix a grammar issue and remove unneeded console logging
This commit is contained in:
parent
8776992d33
commit
633026d252
@ -279,10 +279,9 @@ function renderAnswerSelectionPanel() {
|
||||
|
||||
button.appendChild(document.createTextNode("Couplable"));
|
||||
|
||||
button.addEventListener("click", (event) => {
|
||||
button.addEventListener("click", event => {
|
||||
disableCulpritButtons(culpritChoices, suspect);
|
||||
if (gameData["solo"] === true) event.target.textContent = "envoie des réponses...";
|
||||
else event.target.textContent = "attente des autres joueurs...";
|
||||
event.target.textContent = gameData["solo"] === true ? "Envoi des réponses\u00A0..." : "En attente des autres joueurs\u00A0...";
|
||||
sendAnswers();
|
||||
});
|
||||
|
||||
@ -397,7 +396,6 @@ function initSock() {
|
||||
console.log("Connected to the server!");
|
||||
});
|
||||
|
||||
//TODO Send and receive userprogress when they have sent their responses
|
||||
socket.on("gameprogress", username => {
|
||||
console.log(username);
|
||||
});
|
||||
@ -410,7 +408,6 @@ function initSock() {
|
||||
});
|
||||
|
||||
socket.on("gamefinished", finalResults => {
|
||||
console.log(finalResults);
|
||||
hideFirstClassElement("emotion_and_culprit_choices");
|
||||
const revealScoreElement = document.createElement("h2");
|
||||
revealScoreElement.classList.add("reveal_score");
|
||||
|
@ -188,19 +188,11 @@ async function startGame() {
|
||||
async function joinGame(event) {
|
||||
username = document.getElementById("game_username").value;
|
||||
gameid = document.getElementById("game_room_code").value;
|
||||
console.log(username);
|
||||
data = {}
|
||||
const data = {};
|
||||
data["username"] = username;
|
||||
data["game_id"] = gameid;
|
||||
response = makeAPIRequest("joinGame",data);
|
||||
response.then((value)=>{
|
||||
console.log(value);
|
||||
if (value["error"] != 0){
|
||||
//alert(value["msg"]);
|
||||
}
|
||||
else{
|
||||
window.location.href = "/lobby/" + gameid;
|
||||
}
|
||||
makeAPIRequest("joinGame", data).then(() => {
|
||||
window.location.href = "/lobby/" + gameid;
|
||||
}, () => {
|
||||
event.target.textContent = "Jouer";
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user