Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.28 KB | None | 0 0
  1. int pecasCombinam[numPecas][3][3];
  2.     int num=0;
  3.     for(i=inicioi;i<numPecas;i++){
  4.         for(j=0;j<3;j++){
  5.            for(k=i+1;k<numPecas;k++){
  6.                 for(l=0;l<3;l++){
  7.                     if(jogo[i][j][0] == jogo[k][l][1] && jogo[i][j][1] == jogo[k][l][0] && jogo[i][j][2] == 20 && jogo[k][l][2]==20 && verificaPeca(numPecas,jogo,i,k)!=1){
  8.                             pecasCombinam[num][0][0]=jogo[k][0][0];
  9.                             pecasCombinam[num][0][1]=jogo[k][0][1];
  10.                             pecasCombinam[num][1][0]=jogo[k][1][0];
  11.                             pecasCombinam[num][1][1]=jogo[k][1][1];
  12.                             pecasCombinam[num][2][0]=jogo[k][2][0];
  13.                             pecasCombinam[num][2][1]=jogo[k][2][1];
  14.                             num++;
  15.                     }
  16.                 }
  17.            }
  18.             for(l=0;l<num;l++){
  19.                 for(p=0;p<3;p++){
  20.                     if(jogo[i][j][0] == pecasCombinam[l][p][1] && jogo[i][j][1] == pecasCombinam[l][p][0] && jogo[i][j][2] == 20 && pecasCombinam[l][p][2]==20 && verificaPeca(numPecas,jogo,i,k)!=1){
  21.                         aux1 = jogo[i][j][0];
  22.                         aux2 = jogo[i][j][1];
  23.  
  24.  
  25.                     }
  26.                 }
  27.             }
  28.  
  29.         }
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement