🚨 re-order functions to fix compiler warnings
This commit is contained in:
parent
724fc4b561
commit
a63a23b749
1 changed files with 17 additions and 17 deletions
34
springer.c
34
springer.c
|
@ -8,6 +8,23 @@
|
|||
int schachbrett[GROESSE][GROESSE];
|
||||
long int zurueck;
|
||||
|
||||
int zeigebrett() {
|
||||
int y,x;
|
||||
for (y=0;y<GROESSE;y++) {
|
||||
for (x=0;x<GROESSE;x++) {
|
||||
printf("%2d ",schachbrett[x][y]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
int gueltig(int x, int y) {
|
||||
if ((x>=0) && (x<GROESSE) && (y>=0) && (y<GROESSE))
|
||||
return (schachbrett[x][y]==0);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int springe(int x, int y, int s) {
|
||||
schachbrett[x][y] = s;
|
||||
|
||||
|
@ -33,25 +50,8 @@ int springe(int x, int y, int s) {
|
|||
*/
|
||||
zurueck++;
|
||||
schachbrett[x][y] = 0;
|
||||
}
|
||||
|
||||
int gueltig(int x, int y) {
|
||||
if ((x>=0) && (x<GROESSE) && (y>=0) && (y<GROESSE))
|
||||
return (schachbrett[x][y]==0);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int zeigebrett() {
|
||||
int y,x;
|
||||
for (y=0;y<GROESSE;y++) {
|
||||
for (x=0;x<GROESSE;x++) {
|
||||
printf("%2d ",schachbrett[x][y]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
int main () {
|
||||
springe(0,0,1);
|
||||
}
|
||||
|
|
Reference in a new issue