🚨 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];
|
int schachbrett[GROESSE][GROESSE];
|
||||||
long int zurueck;
|
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) {
|
int springe(int x, int y, int s) {
|
||||||
schachbrett[x][y] = s;
|
schachbrett[x][y] = s;
|
||||||
|
|
||||||
|
@ -35,23 +52,6 @@ int springe(int x, int y, int s) {
|
||||||
schachbrett[x][y] = 0;
|
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 () {
|
int main () {
|
||||||
springe(0,0,1);
|
springe(0,0,1);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue