Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. void zmien_wartosc(pole **plansza, char znak, int x, int y)
  2. {
  3. plansza[x][y].wartosc = znak;
  4. }
  5. void wyp_planszy(int size, pole **plansza) //wypelnia plansze poczatkowo
  6. {
  7.  
  8. for (int i = 0; i < size; i++)
  9. {
  10. for (int j = 0; j < size; j++)
  11. {
  12. if (i == 0 || i == size - 1 || j == 0 || j == size - 1)
  13. {
  14. plansza[i][j].wartosc = '*';
  15. }
  16. else if(plansza[i][j].wartosc != '1')
  17. {
  18. plansza[i][j].wartosc = '.';
  19. }
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement