Ejemplo n.º 1
0
 public void GenerateResultsForRound(int rnd)
 {
     Utility u = new Utility();
     u.EnterResults(workDirectory, rnd);
 }
Ejemplo n.º 2
0
 public void GeneratePlayers(int nPlayers=17, int midpoint=1500, int spread=500 )
 {
     Console.WriteLine("Generate dummy players? ( yes / no)");
     string s = Console.ReadLine();
     if (s.ToUpper().StartsWith("Y"))
     {
         Console.WriteLine("Enter 3 comma separated params (nPlayers,Midpoint,Spread)");
         string auto = Console.ReadLine();
         string[] split = auto.Split(new char[] {','});
         if (split.Length == 3)
         {
             nPlayers = int.Parse(split[0]);
            // rnd = int.Parse(split[1]);
             midpoint = int.Parse(split[1]);
             spread = int.Parse(split[2]);
             Utility u = new Utility();
             string end = "";
             string fn = workDirectory + "players.txt";
             int i = 999100; //fake EGD pin
             using (StreamWriter sw = new StreamWriter(fn, true))
             {
                 for (int np = 0; np < nPlayers; np++)
                     sw.WriteLine(i++ + "," + u.ProvideName() + "," + u.RatingByBox(midpoint, spread) + ",BLF,IE,1k" + end);
             }
         }
         else
             Console.WriteLine("Data entry error, players were not autogenerated");
     }
 }