Started to build game logic in .js file