void Pattern::addAct(Action *act) { // find end of actions chain if (acts == NULL) acts = act; // just set this as the first action in the pattern else { Action *aptr = acts; while (!aptr->isLast()) aptr = aptr->Nxt(); aptr->Append(act); } }