Example #1
0
 public override bool TryFindBlock(SimulationBlock block, ref List <SimulationBlock> blockChain)
 {
     if (block == this)
     {
         blockChain.Insert(0, this); return(true);
     }
     else
     {
         return(false);
     }
 }
Example #2
0
 public override bool TryFindBlock(SimulationBlock block, ref List <SimulationBlock> blockChain)
 {
     for (int i = 0; i < subBlocks.Count; i++)
     {
         if (block == this)
         {
             blockChain.Insert(0, this);
             return(true);
         }
         if (subBlocks[i].TryFindBlock(block, ref blockChain))
         {
             blockChain.Insert(0, this);
             return(true);
         }
     }
     return(false);
 }
Example #3
0
 public abstract bool TryFindBlock(SimulationBlock block, ref List <SimulationBlock> blockChain);