|
|
@ -8,7 +8,7 @@
|
|
|
|
int schachbrett[GROESSE][GROESSE];
|
|
|
|
int schachbrett[GROESSE][GROESSE];
|
|
|
|
long int zurueck;
|
|
|
|
long int zurueck;
|
|
|
|
|
|
|
|
|
|
|
|
int zeigebrett() {
|
|
|
|
void zeigebrett() {
|
|
|
|
int y,x;
|
|
|
|
int y,x;
|
|
|
|
for (y=0;y<GROESSE;y++) {
|
|
|
|
for (y=0;y<GROESSE;y++) {
|
|
|
|
for (x=0;x<GROESSE;x++) {
|
|
|
|
for (x=0;x<GROESSE;x++) {
|
|
|
@ -25,13 +25,13 @@ int gueltig(int x, int y) {
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int springe(int x, int y, int s) {
|
|
|
|
void springe(int x, int y, int s) {
|
|
|
|
schachbrett[x][y] = s;
|
|
|
|
schachbrett[x][y] = s;
|
|
|
|
|
|
|
|
|
|
|
|
/* printf ("Zug %2d: %d %d\n",s,x,y); */
|
|
|
|
/* printf ("Zug %2d: %d %d\n",s,x,y); */
|
|
|
|
|
|
|
|
|
|
|
|
if (s==GROESSE*GROESSE) {
|
|
|
|
if (s==GROESSE*GROESSE) {
|
|
|
|
printf("yeah! %d Züge zurückgenommen!\n", zurueck);
|
|
|
|
printf("yeah! %ld Züge zurückgenommen!\n", zurueck);
|
|
|
|
zeigebrett();
|
|
|
|
zeigebrett();
|
|
|
|
exit(0);
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|