main.js contain the logic of game but with syntax problem