Esempio n. 1
0
 private static void GetAdjacentRunesRecursivelyHelper(Rune startRune, HashSet<Rune> visitedRunes)
 {
     visitedRunes.Add(startRune);
     foreach (Rune adjacentRune in startRune.AdjacentRunes)
     {
         if(!visitedRunes.Contains(adjacentRune))
             GetAdjacentRunesRecursivelyHelper(adjacentRune, visitedRunes);
     }
 }
Esempio n. 2
0
 private void CreateRuneAdjacency(Rune r1, Rune r2)
 {
     r1.AdjacentRunes.Add(r2);
     r2.AdjacentRunes.Add(r1);
 }
Esempio n. 3
0
 public static HashSet<Rune> GetAdjacentRunesRecursively(Rune startRune)
 {
     HashSet<Rune> visitedRunes = new HashSet<Rune>();
     GetAdjacentRunesRecursivelyHelper(startRune, visitedRunes);
     return visitedRunes;
 }
Esempio n. 4
0
 public RuneBoundParticleSwarm(int particleCount, Rune rune)
     : base(particleCount, rune.Position, RuneColor(rune.GetType()))
 {
     this.Rune = rune;
     rune.particleSwarm = this;
 }