Beispiel #1
0
 public void GetOpponent(String name)
 {
     Console.WriteLine("GetOpponent");
      Brute tmp = new Brute(); bool OtherBrute = true;
      while (OtherBrute)
      {
         tmp = SocketServer.listBrute.ElementAt(new Random().Next(0,SocketServer.listBrute.Count)).Value;
         OtherBrute = tmp.Name.Equals(name);
      }
      this.GetWriter.CreateDiscriminant(ProtocoleImplementation.ANSWER_DOWNLOAD_BRUTE);
      this.GetWriter.CreateString(tmp.getParam());
      this.GetWriter.CreateDiscriminant(ProtocoleImplementation.ANSWER_DOWNLOAD_BRUTE_IMG);
      this.GetWriter.CreateImage("../../res/perso/Perso-" + tmp.Image + ".jpg");
      this.GetWriter.CreateLongInt(tmp.BonusList.Count);
      foreach (Bonus bonus in tmp.BonusList) { this.GetBonus(bonus.Name); }
      this.GetWriter.Send();
      Console.WriteLine("FinGetOpponent");
 }