There you have to decide, what kind of complexity you would like to have.
Then you have to decide, whether you calculate, whether and what kind of situation there is (freekick, goal, penalty, corner, throw-in,..) or you start calculating in the beginning.
By the first one you have the result and then you generate the situation. For example calculate player against player in each corner and the one with the highest aggression (influecend by random parameters) gets the card.
By the second one you start with choosing a team. then you take a (randomize) starting point, f.e. CD, and calculate where he could pass, whether there is an opponent to steal the pass, how fast the receiving player is, and so on..
It looks very hard, but in IT, it's for every second just ms