Swarming, a collective motion of many thousands of cells, produces colonies that rapidly spread over surfaces. In this paper we introduce a cell-based model to study how interactions between neighboring cells facilitate swarming. We chose to study Myxococcus xanthus, a species of myxobacteria, because it swarms rapidly and has welldefined cell-cell interactions, mediated by type IV pili and by slime trails. The aim of this paper is to test whether the cell contact interactions that are inherent in pili-based S motility and slime-based A motility are sufficient to explain the observed expansion of wild type swarms. The simulations yield a constant rate of swarm expansion, which has been observed experimentally. Also the model is able to quantify the contributions of S motility and A motility to swarming. Some pathogenic bacteria spread over infected tissue by swarming. The model described here may shed some light on the colonization process.