Updated so that choose_index also passes the player.