neingeist
/
springer
Archived
1
0
Fork 0

🚨 re-order functions to fix compiler warnings

master
neingeist 4 years ago
parent 724fc4b561
commit a63a23b749

@ -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);
}