separate play.html js into play.js