Add function to update player order from state