//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(); }
private static void query_up_and_revive(ref jumpPrime obj, int queries) { iterate_up(ref obj, queries); Console.WriteLine("Revive Object..."); obj.revive(); }