Skip to content

Commit

Permalink
logs comentados
Browse files Browse the repository at this point in the history
  • Loading branch information
UO290054 committed Apr 15, 2024
1 parent 1c605e8 commit 657ea29
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions webapp/src/components/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const Game = () => {
}, []);

useEffect(() => {
console.log("eyou");
//console.log("eyou");
const intervalId = setInterval(() => {
setSeconds(prevSeconds => prevSeconds + 1);
}, 1000);
Expand Down Expand Up @@ -286,14 +286,14 @@ const getQuestions = () => {
button.disabled = true;
button.onmouse = null;
});
console.log("finishGame " + correctCounter);
//console.log("finishGame " + correctCounter);
var correctas = (correctCounter / numberOfQuestions) * 100;
console.log("corr1 " + correctas);
//console.log("corr1 " + correctas);
if (!Number.isInteger(correctas)){
correctas = correctas.toFixed(2);
console.log("dentro " + correctas);
//console.log("dentro " + correctas);
}
console.log("corr2 " + correctas);
//console.log("corr2 " + correctas);
setPercentage(correctas);

//a partir de aqui guardar la partida
Expand All @@ -307,14 +307,14 @@ const getQuestions = () => {
correctAnswers: correctCounter,
incorrectAnswers: numberOfQuestions-correctCounter
};
console.log("Se va a guardar la siguiente partida:");
console.log("Username:", newGame.username);
console.log("Duración:", newGame.duration);
console.log("Preguntas:", newGame.questions);
console.log("Porcentaje de Aciertos:", newGame.percentage);
console.log("Número Total de Preguntas:", newGame.totalQuestions);
console.log("Número de Respuestas Correctas:", newGame.correctAnswers);
console.log("Número de Respuestas Incorrectas:", newGame.incorrectAnswers);
//console.log("Se va a guardar la siguiente partida:");
//console.log("Username:", newGame.username);
//console.log("Duración:", newGame.duration);
//console.log("Preguntas:", newGame.questions);
//console.log("Porcentaje de Aciertos:", newGame.percentage);
//console.log("Número Total de Preguntas:", newGame.totalQuestions);
//console.log("Número de Respuestas Correctas:", newGame.correctAnswers);
//console.log("Número de Respuestas Incorrectas:", newGame.incorrectAnswers);



Expand Down

0 comments on commit 657ea29

Please sign in to comment.