add javascript for the 'game-logic'