The JS behind the game