清理无用代码
This commit is contained in:
parent
05cc67532b
commit
4ec804da4f
@ -1,14 +1,5 @@
|
|||||||
const client = io()
|
const client = io()
|
||||||
|
|
||||||
client.on('role', (name) => {
|
client.on('message', (message) => {
|
||||||
role.innerText = name
|
console.log(message)
|
||||||
})
|
})
|
||||||
|
|
||||||
client.on('player', (player) => {
|
|
||||||
gameButton.classList = player
|
|
||||||
gameButton.innerText = player == 'player1' ? '玩家1' : '玩家2'
|
|
||||||
})
|
|
||||||
|
|
||||||
gameButton.onclick = () => {
|
|
||||||
client.emit('click')
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user