public void Correr(Atleta atleta) { int numeroAleatorio = _avance.Next(1, 10); if (numeroAleatorio <= 5) { atleta.Posicion += 2; } else if (numeroAleatorio <= 8) { atleta.Posicion += 1; } else { atleta.Posicion += 3; } }
public Carrera(string nombreA1, string nombreA2) { _atleta1 = new Atleta(nombreA1); _atleta2 = new Atleta(nombreA2); _avance = new Random(DateTime.Now.Millisecond); }