Browse Source

Funktionsupdate

main
Siamak 2 years ago
parent
commit
b1a4ef03aa
  1. 8
      src/Spiellogik.c

8
src/Spiellogik.c

@ -138,14 +138,14 @@ int update(int realU[N][N],char richtung) {
if (jj == 0) {
return 1;
}
if (realbU[ii][jj - 1] == (N * N) + 1) {
realb[ii][jj - 1] = groesste + 1;
if (realU[ii][jj - 1] == (N * N) + 1) {
realU[ii][jj - 1] = groesste + 1;
apple(realU);
speed = speed + 20;
}
else {
if (!lose(realU, richtung)) {
realU[ii][jj - 1] = max + 1;
realU[ii][jj - 1] = groesste + 1;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (realU[i][j] != 0 && realU[i][j] != (N * N) + 1) {
@ -164,7 +164,7 @@ int update(int realU[N][N],char richtung) {
return 1;
}
if (realU[ii][jj + 1] == (N * N) + 1) {
realb[ii][jj + 1] = groesste + 1;
realU[ii][jj + 1] = groesste + 1;
apple(realU);
speed = speed + 20;
}

Loading…
Cancel
Save