Update main.js

Bug fixed about restarting game.
Merge pull request #12 from SozWD/patch-1

Update main.js