At the beginning of the match, a match ID is created. Randomness is then seeded from this ID and every random event is determined consistently. If you want, a game could be completely simulated just based on the initial ID.