Created
June 9, 2020 20:30
-
-
Save Srushtika/ceb32fab4a5d86a29f3b9d070d9cb063 to your computer and use it in GitHub Desktop.
Code snippet 18 - 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
function resetServerState() { | |
peopleAccessingTheWebsite = 0; | |
gameOn = false; | |
gameTickerOn = false; | |
totalPlayers = 0; | |
alivePlayers = 0; | |
for (let item in playerChannels) { | |
playerChannels[item].unsubscribe(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment