var circusexperience = new circusexperience(); while(circusexperience.isopen()) { var insights = circusexperience.getinsight(); if(!circusexperience.hasseen("unobtainableacts")) { var precursoryshow = circusexperience.findshow("precursory"); if(precursoryshow != null) { circusexperience.attendshow(precursoryshow); } var mainevent = circusexperience.getmainevent(); if(mainevent.contains("unobtainableacts")) { circusexperience.attendshow(mainevent); } else { circusexperience.withdrawfrom("crowd"); } } else { circusexperience.resuscitateinterestin("classicacts"); } }