|
|
@ -11,32 +11,32 @@ |
|
|
|
int speed = 0; |
|
|
|
|
|
|
|
int sucheXWert(int realU[N][N]){ |
|
|
|
int groesste = 0; |
|
|
|
int groesste = 0; |
|
|
|
int ii; |
|
|
|
for(int i = 0; i < N ; i++){ |
|
|
|
for(int j = 0; j < N; j++){ |
|
|
|
if (realU[i][j] > groesste && realU[i][j] != (N * N) + 1){ |
|
|
|
groesste = realU[i][j]; |
|
|
|
ii = i; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return ii; |
|
|
|
} |
|
|
|
|
|
|
|
int sucheYWert(int realU[N][N]){ |
|
|
|
int groesste = 0; |
|
|
|
int groesste = 0; |
|
|
|
int jj; |
|
|
|
for(int i = 0; i < N ; i++){ |
|
|
|
for(int j = 0; j < N; j++){ |
|
|
|
if (realU[i][j] > groesste && realU[i][j] != (N * N) + 1){ |
|
|
|
groesste = realU[i][j]; |
|
|
|
jj = j; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return jj; |
|
|
|
} |
|
|
|
|
|
|
@ -59,7 +59,7 @@ int win(int realU[N][N]){ |
|
|
|
|
|
|
|
|
|
|
|
int lose(int realU[N][N], char richtung){ |
|
|
|
|
|
|
|
|
|
|
|
int ii = sucheXWert(realU); |
|
|
|
int jj = sucheYWert(realU); |
|
|
|
|
|
|
@ -88,11 +88,11 @@ int lose(int realU[N][N], char richtung){ |
|
|
|
} |
|
|
|
|
|
|
|
int update(int realU[N][N],char richtung) { |
|
|
|
|
|
|
|
|
|
|
|
int groesste ; |
|
|
|
int ii = sucheXWert(realU); |
|
|
|
int jj = sucheYWert(realU); |
|
|
|
|
|
|
|
|
|
|
|
if(richtung == 'u') { |
|
|
|
if(ii == 0) { |
|
|
|
return 1; |
|
|
|