neingeist
/
springer
Archived
1
0
Fork 0

🧹 use gcc -Wall and fix warnings

master
neingeist 4 years ago
parent d5e7efa133
commit 3374508b1f

@ -1,4 +1,5 @@
TARGETS := springer
CC := gcc -Wall
all: $(TARGETS)

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