diff --git a/webapp/src/components/game/ScoreboardGame.tsx b/webapp/src/components/game/ScoreboardGame.tsx index 9806415..28eb8f9 100644 --- a/webapp/src/components/game/ScoreboardGame.tsx +++ b/webapp/src/components/game/ScoreboardGame.tsx @@ -14,7 +14,7 @@ const ScoreboardGame:FC = ({userScoresSinglePlayer, userSco if(userScoresSinglePlayer){ sorted = userScoresSinglePlayer.sort((a, b) => b.points - a.points); } else if (userScoresMultiPlayer){ - sorted = userScoresMultiPlayer; + sorted = userScoresMultiPlayer.sort((a, b) => b.points - a.points); } return (
diff --git a/webapp/src/components/game/multiplayer/GameMultiPlayer.tsx b/webapp/src/components/game/multiplayer/GameMultiPlayer.tsx index 0267bd1..7644e54 100644 --- a/webapp/src/components/game/multiplayer/GameMultiPlayer.tsx +++ b/webapp/src/components/game/multiplayer/GameMultiPlayer.tsx @@ -50,15 +50,11 @@ const GameMultiPlayer: FC = () => { }); newSocket.on('joinedParty', (user: UserPlayer) => { - console.log(user) - console.log(`User ${username} joined the party`); setStage(2); - console.log(users) }) newSocket.on('lobbyUsers', (users: UserPlayer[]) => { setUsers(users); - console.log(users) }); newSocket.on('partyNotFound', () => { @@ -66,14 +62,11 @@ const GameMultiPlayer: FC = () => { }); newSocket.on('allPlayersFinished', (playersWithPoints:PlayerWithPoints[]) => { - console.log(playersWithPoints) setSortedUsersByPoints(playersWithPoints); setStage(4); }) newSocket.on('questionsUpdated', (questions: Question4Answers[]) => { - console.log('questions recieved from server') - console.log(questions); setQuestions(questions); setStage(3); }) diff --git a/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx b/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx index 707874c..d21bd1a 100644 --- a/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx +++ b/webapp/src/components/game/multiplayer/LobbyMultiPlayer.tsx @@ -21,16 +21,11 @@ const LobbyMultiPlayer: FC = ({socket, handleCurrentStage const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; try { - console.log(users) const requestData = { players: users.map((user) => ({uuid: user.uuid})) } - console.log("requestData") - console.log(requestData) const response = await axios.post(`${apiEndpoint}/createGame`, requestData); - console.log("Juego creado") - console.log(response.data) socket.emit('updateQuestions', partyCode, response.data); setFetched(true); } catch (error) { diff --git a/webapp/src/components/game/multiplayer/MenuMultiplayer.tsx b/webapp/src/components/game/multiplayer/MenuMultiplayer.tsx index c22dbcb..9512f84 100644 --- a/webapp/src/components/game/multiplayer/MenuMultiplayer.tsx +++ b/webapp/src/components/game/multiplayer/MenuMultiplayer.tsx @@ -27,9 +27,6 @@ const MenuMultiplayer: FC = ({socket, handleCurrentStage, }; const joinParty = () => { - console.log("Joining party...") - console.log(typedCode) - console.log(username) const user: UserPlayer = { username: username, totalPoints: parseInt(totalPoints), diff --git a/webapp/src/components/game/multiplayer/QuestionsMultiPlayer.tsx b/webapp/src/components/game/multiplayer/QuestionsMultiPlayer.tsx index 0eaadf4..90a44b0 100644 --- a/webapp/src/components/game/multiplayer/QuestionsMultiPlayer.tsx +++ b/webapp/src/components/game/multiplayer/QuestionsMultiPlayer.tsx @@ -23,12 +23,9 @@ const QuestionsMultiPlayer: FC = ({socket, questions, } setCurrentQuestion(currentQuestion + 1); - console.log(currentQuestion+2) - console.log(questions.length) if(currentQuestion+2 === questions.length){ const totalPoints = calculatePoints(correctAnswers, questions.length); // the player has finished the game - console.log("finish") // update stats for each player const requestData ={ "players": [{ "uuid": uuid,