The spatial voting theory literature has generally focused on either parties or candidates as the unit of analysis and ignored strategic interactions between them. I study a game theoretic spatial model of elections with many heterogeneous constituencies in which both party and candidate behavior are modeled. Parties choose a platform and a ‘whip rate,’ representing the proportion of final policy that will be made by the party, as opposed to by the successful candidates. Candidates are office-motivated and can choose both a platform and a level of advertising in order to defeat their opponent. It is shown that the introduction of whipping as a choice variable can cause party platforms to diverge and that parties will whip on some but not all issues, reflecting the empirical reality of parties influencing rather than determining policy outcomes exclusively. Further, parties respond to sharper voter polarization by reducing the power of the whip as well as distinguishing their platforms from one another, while more voter uncertainty has the opposite effect. Other real-world phenomena, including ‘safe seats’ and legislators voting with their party even when unwhipped, are also shown to be predicted by the model.