Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(a==b)
- {
- showoff(a, c);
- cout<<" BATTLES ";
- showoff(b, d);
- cout<<endl;
- while(f!=true){
- a=handone[t];
- c=kolorone[t];
- b=handtwo[t];
- d=kolortwo[t];
- if(a==b){
- t=t+2;
- showoff(a, c);
- cout<<" BATTLES ";
- showoff(b, d);
- cout<<endl;
- }
- if(a>b){
- showoff(a, c);
- cout<<" WON !!"<<endl;
- f=true;
- for(int i=0;i<=t;i++){
- h=handone[0];
- j=kolorone[0];
- z=1;
- for(p=0;p<g;p++){
- if(z==g)
- {
- handone[p]=h;
- kolorone[p]=j;
- }
- else
- {
- handone[p]=handone[z];
- kolorone[p]=kolorone[z];
- z++;
- }
- }
- }
- for(int i=0;i<=t;i++){
- handone[g]=handtwo[i];
- kolorone[g]=kolortwo[i];
- g++;
- }
- for(int i=0;i<=t;i++){
- z=1;
- for(p=0;p<x;p++){
- handtwo[p]=handtwo[z];
- kolortwo[p]=kolortwo[z];
- z++;
- }
- x--;
- }
- showhand(handone, handtwo, x, g, kolorone, kolortwo);
- }
- if(b>a){
- showoff(b, d);
- cout<<" WON !!"<<endl;
- f=true;
- for(int i=0;i<=t;i++){
- h=handtwo[0];
- j=kolortwo[0];
- z=1;
- for(p=0;p<x;p++){
- if(z==x)
- {
- handtwo[p]=h;
- kolortwo[p]=j;
- }
- else
- {
- handtwo[p]=handtwo[z];
- kolortwo[p]=kolortwo[z];
- z++;
- }
- }
- }
- for(int i=0;i<=t;i++){
- handtwo[x]=handone[i];
- kolortwo[x]=kolorone[i];
- x++;
- }
- for(int i=0;i<=t;i++){
- z=1;
- for(p=0;p<g;p++){
- handtwo[p]=handtwo[z];
- kolortwo[p]=kolortwo[z];
- z++;
- }
- g--;
- }
- showhand(handone, handtwo, x, g, kolorone, kolortwo);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement