From 4ec804da4fe5e8c96e9dff6eccc68af40431269e Mon Sep 17 00:00:00 2001 From: Zhao Xin <7176466@qq.com> Date: Fri, 5 Aug 2022 08:23:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/game.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/public/game.js b/public/game.js index 790c4ce..a71ecb1 100644 --- a/public/game.js +++ b/public/game.js @@ -1,14 +1,5 @@ const client = io() -client.on('role', (name) => { - role.innerText = name +client.on('message', (message) => { + console.log(message) }) - -client.on('player', (player) => { - gameButton.classList = player - gameButton.innerText = player == 'player1' ? '玩家1' : '玩家2' -}) - -gameButton.onclick = () => { - client.emit('click') -}