Created
June 9, 2020 21:01
-
-
Save Srushtika/43651d7fba2ade4880c678bebc5d7e6d to your computer and use it in GitHub Desktop.
Code snippet 23 - For multiplayer space invaders article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let gameRoom; | |
let deadPlayerCh; | |
let myClientId; | |
let myChannel; | |
let gameOn = false; | |
let players = {}; | |
let totalPlayers = 0; | |
let latestShipPosition; | |
let bulletThatShotMe; | |
let bulletThatShotSomeone; | |
let bulletOutOfBounds = ""; | |
let amIalive = false; | |
let game; | |
const BASE_SERVER_URL = "http://localhost:5000"; | |
const myNickname = localStorage.getItem("nickname"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment