| 122 | } |
| 123 | |
| 124 | bool Strategy::hasFather() { |
| 125 | if (imp->father != NULL) { |
| 126 | for (int i=0;i< imp->father->nodes.size();i++) { |
| 127 | if ((imp->father->nodes[i].imp) == imp) |
| 128 | return true; |
| 129 | } |
| 130 | } |
| 131 | return false; |
| 132 | } |
| 133 | |
| 134 | Strategy Strategy::getChild(int i) { |
| 135 | if (i<0 || i>=degree() ) {cout<<"Child "<<i<<" does not exist"<<endl;abort();} |