Skip to content

Commit

Permalink
1 file edited
Browse files Browse the repository at this point in the history
  • Loading branch information
Croc-Prog-github authored May 15, 2024
1 parent c42eb02 commit 31beff8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions game/multiP/CreaSq/CreaSq_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
function CreaCodSq() {
// Fai una richiesta al server per creare una nuova stanza
fetch('http://127.0.0.1:2567/')
.then(response => response.json())
.then(data => {
// Aggiorna l'interfaccia utente con RoomId e SessionId ottenuti dal server
document.getElementById('roomId').textContent = data.roomId;
document.getElementById('sessionId').textContent = data.sessionId;
})
.catch(error => {
console.error('Error creating room:', error);
});
.then(response => response.json())
.then(data => {
// Aggiorna l'interfaccia utente con RoomId e SessionId ottenuti dal server
document.getElementById('roomId').textContent = data.roomId;
document.getElementById('sessionId').textContent = data.sessionId;
})
.catch(error => {
console.error('Error creating room:', error);
});
}

0 comments on commit 31beff8

Please sign in to comment.