reset polja
Dependents: ping-pong_PORJEKT ping-pong_PORJEKT
Revision 0:406a3c5e4754, committed 2021-02-22
- Comitter:
- atopcic
- Date:
- Mon Feb 22 08:24:36 2021 +0000
- Commit message:
- reset;
Changed in this revision
resetpolja.cpp | Show annotated file Show diff for this revision Revisions of this file |
resetpolja.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resetpolja.cpp Mon Feb 22 08:24:36 2021 +0000 @@ -0,0 +1,23 @@ +// funkcija resetiranja polja loptice: +#include "resetpolja.h" + +int polje[8][8] = { + {0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0} +}; + + void ResetPoljaLoptice (void){ + for(int i=1;i<7;i++) + { + for(int j=0;j<8;j++) + { + polje[i][j]=0; + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resetpolja.h Mon Feb 22 08:24:36 2021 +0000 @@ -0,0 +1,8 @@ +#ifndef RESETPOLJA_H +#define RESETPOLJA_H +#include "mbed.h" + +extern int polje[8][8]; + +void ResetPoljaLoptice (void); +#endif \ No newline at end of file