|
|
@ -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;
|
|
|
|
|
|
|
|
|
|
|
@ -33,25 +50,8 @@ int springe(int x, int y, int s) {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
zurueck++;
|
|
|
|
zurueck++;
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|