|
|
@ -59,17 +59,9 @@ int win(int realU[N][N]){ |
|
|
|
|
|
|
|
|
|
|
|
int lose(int realU[N][N], char richtung){ |
|
|
|
int groesste = 0; //Suche den Kopf der Schlange |
|
|
|
int ii, 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]; |
|
|
|
ii = i; |
|
|
|
jj = j; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
int ii = sucheXWert(realU); |
|
|
|
int jj = sucheYWert(realU); |
|
|
|
|
|
|
|
if (richtung == 'u') { |
|
|
|
if (realU[ii - 1][jj] != (N*N) + 1&& realU[ii - 1][jj] != 0) { |
|
|
|