batFight function

bool batFight(
  1. dynamic batman,
  2. dynamic robin,
  3. dynamic joker,
  4. bool condition,
)

TODO teamDev Untested function, NOT-READY TODO teamNext returns, when joker returns false and others are true

Implementation

bool batFight(var batman, var robin, var joker, bool condition) {
  batman();
  robin();
  joker();
  num _loopCount = 0;
  num _loopMax = 3; //  backdoor
//TODO  control
  bool _thisCondition = condition;
  do {
    _loopCount++;
    if (_loopCount == _loopMax) (_thisCondition = true); // backdoor
    if (batman() == false) {
      _thisCondition == false;
    } else if (robin() == false) {
      _thisCondition == false;
    } else if (joker() == false) {
      _thisCondition == true;
    } else {
      _thisCondition == true;
    }
  } while (!_thisCondition);
  //TODO  teamNext    isolateFuncOne()     // roll inside isolate
  //    isolateFuncTwo()
  return _thisCondition;
}