The game of intra-party politics