  Using Monte Carlo techniques, we study a simple model which exhibits a
competition between superconductivity and other types of order in two
dimensions. The model is a site-diluted XY model, in which the XY spins are
mobile, and also experience a repulsive interaction extending to one, two, or
many shells of neighbors. Depending on the strength and range of the repulsion
and spin concentration, the spins arrange themselves into a remarkable variety
of patterns at low temperatures $T$, including phase separation, checkerboard
order, and straight or labyrinthine patterns of stripes, which sometimes show
hints of nematic or smectic order. This pattern formation profoundly affects
the superfluid density, $\gamma$. Phase separation tends to enhance $\gamma$,
checkerboard order suppresses it, and stripe formation increases the component
of $\gamma$ parallel to the stripes and reduces the perpendicular one. We
verify that $\gamma(T = 0)$ is proportional to the effective conductance of a
random conductance network whose conductances equal the couplings of the XY
system. Possible connections between the model and real materials, such as
single high-T$_c$ cuprate layers, are briefly discussed.
