Beispiel #1
0
 public void WelshPowellPass(int numColors, ref AdjList adjList, ref Stack stack)
 {
     if (bannedColors == null)
     {
         bannedColors = new int[numColors];
     }
     for (int i = 0; i < numColors; i++)
     {
         if (bannedColors[i] == 0)
         {
             color = i;
             break;
         }
     }
     adjList.BanColor(course, color, numColors);
     stack.Push(this);
 }
Beispiel #2
0
 public int SmallestLastPass(int numColors, ref AdjList adjList)
 {
     if (bannedColors == null)
     {
         bannedColors = new int[numColors];
     }
     for (int i = 0; i < numColors; i++)
     {
         if (bannedColors[i] == 0)
         {
             color = i;
             break;
         }
     }
     adjList.BanColor(course, color, numColors);
     return(color);
 }