Beispiel #1
0
 /// <summary>
 /// Registers and returns a new ID for an object of the given type.
 /// </summary>
 /// <returns>A new unique ID that can be used to identify the object.</returns>
 public int RegisterBotID()
 {
     if (Bots.Any() && _botID <= Bots.Max(e => e.ID))
     {
         _botID = Bots.Max(e => e.ID) + 1;
     }
     return(_botID++);
 }