Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include<stdio.h>
  2. #include "header.h"
  3. int i,j,k;
  4.  
  5.  
  6. int main(){
  7.  
  8. FIELD f;
  9. for(i=0;i<7;i++){
  10. for(j=1;j<8;j++){
  11.  
  12. init_field(&f,j);
  13.  
  14. for(k=0;k<11;k++){
  15. printf("%c",f.matrix[i][k]);
  16. }
  17. }
  18. putchar('\n');
  19. }
  20.  
  21.  
  22.  
  23.  
  24. }
  25.  
  26. void init_field(FIELD *p, int n){
  27.  
  28.  
  29. switch(n){
  30.  
  31. case 1:
  32. *p=BLACK_FIELD;
  33.  
  34. break;
  35. case 2:
  36. *p=WHITE_FIELD;
  37. break;
  38. case 3:
  39. *p=CRNI_PAWN;
  40.  
  41.  
  42. break;
  43. case 4:
  44. *p=BIJELI_PAWN;
  45.  
  46. break;
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement