leftSibling method

int? leftSibling()

Implementation

int? leftSibling() {
  var pgo = GameObject(parent);
  var theChild = GameObject(pgo.child);

  while (theChild.sibling != id) {
    theChild = GameObject(theChild.sibling);

    if (theChild.id == 0) {
      throw GameException('Sibling list not well formed.');
    }
  }

  return theChild.id;
}