Updated js file to include game logic