Refactoring Layzors Game js.js