This work formulates frictionless contact between solid bodies in terms of a repulsive potential energy term and illustrates how numerical integration of the resulting forces is computationally similar to the pinball algorithm proposed and studied by Belytschko and collaborators in the 1990s. We thereby arrive at a numerical approach that has both the theoretical advantages of a potential-based formulation and the algorithmic simplicity, computational efficiency, and geometrical versatility of pinball contact. The singular nature of the contact potential requires a specialized nonlinear solver and an adaptive time stepping scheme to ensure reliable convergence of implicit dynamic calculations. We illustrate the effectiveness of this numerical method by simulating several benchmark problems and the structural mechanics of the right atrioventricular (tricuspid) heart valve. Atrioventricular valve closure involves contact between every combination of shell surfaces, edges of shells, and cables, but our formulation handles all contact scenarios in a unified manner. We take advantage of this versatility to demonstrate the effects of chordal rupture on tricuspid valve coaptation behavior.