This function prints a winning strategy.
| 29 | |
| 30 | // This function prints a winning strategy. |
| 31 | void printStr(Strategy s,int depth=0) { |
| 32 | StrategyNode plop = s.getTag(); |
| 33 | for (int glou=0;glou<depth;glou++) cout<<" "; |
| 34 | if (s.isTrue()) cout<<"TRUE"<<endl; |
| 35 | else if (s.isFalse()) cout<<"FALSE"<<endl; |
| 36 | else cout<<"type "<<plop.type<<" qt "<<plop.quantifier<<" vmin "<<plop.Vmin<<" vmax "<<plop.Vmax<<" scope "<<plop.scope<<" - "; |
| 37 | for (int i=0;i<s.getTag().valeurs.size();i++) cout<<s.getTag().valeurs[i]<<" "; |
| 38 | cout<<endl; |
| 39 | for (int glou=0;glou<depth;glou++) cout<<" "; |
| 40 | cout<<s.degree()<<" child(ren)"<<endl; |
| 41 | for (int i=0;i<s.degree();i++) { |
| 42 | for (int glou=0;glou<depth;glou++) cout<<" "; |
| 43 | cout<<"Child "<<i<<" : "<<endl; |
| 44 | printStr(s.getChild(i),depth+1); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // This is a set of tiny problems which are used to dtect errors in QeCode. |
| 49 | // This set is likely to progressively enlarge... |