public static void setRandomEngine() { if (rnd == null) { System.Random temp = new System.Random(); //UPGRADE_TODO: Method 'java.util.Random.nextLong' was converted to 'SupportClass.NextLong' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilRandomnextLong'" Updater.seed = SupportClass.NextLong(temp); //UPGRADE_TODO: The differences in the expected value of parameters for constructor 'java.util.Random.Random' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1092'" rnd = new System.Random((System.Int32)Updater.seed); } /* else it should raise an exception or warn the user in some ways*/ }
public static void GenerateSeeds(IGenerator competition) { // I need to be able to retrieve match set from IGenerator object. Engine.Match[] m = competition.Matches; for (int i = 0; i < m.Length; i++) { long seed; do { //UPGRADE_TODO: Method 'java.util.Random.nextLong' was converted to 'SupportClass.NextLong' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilRandomnextLong'" seed = SupportClass.NextLong(r); }while (seed == -1); // Match object must have a method to set a new seed. m[i].Seed = seed; } }