Exemplo n.º 1
0
 public static void runUpDownQuerries(ref jumpPrime myObj)
 {
     while (myObj.getActiveStatus())
     {
         Console.WriteLine($"Up:   {myObj.up()}");
         Console.WriteLine($"Down: {myObj.down()}");
     }
 }
Exemplo n.º 2
0
 //may out many zeros if object becomes inactive
 private static void iterate_down(ref jumpPrime obj, int num)
 {
     Console.WriteLine("We are querying the down call: ");
     for (int i = 0; i < num; i++)
     {
         Console.Write(i + ". " + obj.down() + "  ");
     }
     Console.WriteLine();
 }
Exemplo n.º 3
0
 //once it becomes inactive, it should revive
 private static void iterate_down_with_revive(ref jumpPrime obj, int num)
 {
     Console.WriteLine("We are querying the down call: ");
     for (int i = 0; i < num; i++)
     {
         if (obj.getActive())
         {
             Console.Write(i + ". " + obj.down() + "  ");
         }
         else
         {
             Console.Write("We exceeded the querying limit... Must Revive  ");
             obj.revive();
             break;
         }
     }
     Console.WriteLine();
 }