Simulation Code for the team strategy