Assessing defensive and offensive aspects of bacterial infection using computer simulations