debug
This commit is contained in:
parent
95637dc20b
commit
f53a0e2847
|
|
@ -12,7 +12,11 @@ export const useWebsocketStore = defineStore("websocket", {
|
|||
init(gameId) {
|
||||
const player = usePlayerStore()
|
||||
const game = useGameStore()
|
||||
if (game.owner == player.id || game.opponent.id == player.id) window.location.href = window.location.origin + '/lobby/' + game.id
|
||||
console.log(game.owner, game.opponent.id, player.id)
|
||||
if (game.owner == player.id || game.opponent.id == player.id) {
|
||||
window.location.href = window.location.origin + '/lobby/' + game.id
|
||||
return
|
||||
}
|
||||
this.connection = new WebSocket(connectionUrl + "?gameId=" + gameId + "&playerId=" + player.id);
|
||||
this.connection.onopen = function (event) {
|
||||
console.log(event);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user