コード例 #1
0
 internal ZNGameDatabaseNode(ZNGameDatabase db, ZNGameDatabaseNode parent, ZNGame value)
 {
     databaseInternal = db;
     parentInternal   = parent;
     childrenInternal = new List <ZNGameDatabaseNode>();
     valueInternal    = value;
 }
コード例 #2
0
 public int CompareTo(object obj)
 {
     if (obj == null)
     {
         return(1);
     }
     if (obj is ZNGame)
     {
         ZNGame  other         = (ZNGame)obj;
         short[] otherMoves    = other.movesInternal;
         int     smallerLenght = movesInternal.Length;
         if (smallerLenght > otherMoves.Length)
         {
             smallerLenght = otherMoves.Length;
         }
         for (int i = 0; i < smallerLenght; i++)
         {
             if (movesInternal[i] > otherMoves[i])
             {
                 return(1);
             }
             if (movesInternal[i] < otherMoves[i])
             {
                 return(-1);
             }
         }
         if (movesInternal.Length > smallerLenght)
         {
             return(1);
         }
         if (otherMoves.Length > smallerLenght)
         {
             return(-1);
         }
         return(0);
     }
     throw new ArgumentException("Argument has to be a ZNGame!");
 }
コード例 #3
0
 internal void Remove(ZNGame g)
 {
     root.Remove();
 }
コード例 #4
0
 internal void Add(ZNGame game)
 {
     root.Add();
 }
コード例 #5
0
 internal void Remove(ZNGame g)
 {
     root.Remove();
 }
コード例 #6
0
 internal void Add(ZNGame game)
 {
     root.Add();
 }