main.js added state

 trying to work out client disconnect and then starting a new instance
of the game