mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
11 lines
243 B
JavaScript
11 lines
243 B
JavaScript
const socket = io();
|
|
var currentGame = null
|
|
socket.on('state', function(game) {
|
|
currentGame = game;
|
|
console.log(currentGame);
|
|
});
|
|
|
|
window.onload = function() {
|
|
socket.emit('requestState', {code: sessionStorage.getItem("code")});
|
|
}
|