Guest User

Untitled

a guest
Apr 22nd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. int insereix(Tcarta carta,int pos,Tjoc *joc){
  2.  
  3. int i;
  4.  
  5. if (pos < MAXCARTES && pos >= 0 && pos < joc->ncartes){
  6. for(i = joc->ncartes ; i >= pos; i--){
  7. joc->cartes[i] = joc->cartes[i-1];
  8. }
  9. joc->ncartes ++;
  10. joc->cartes[pos] = carta;
  11. return 1;
  12. }
  13. else return 0;
  14.  
  15. }
Add Comment
Please, Sign In to add comment