fix read with ask

This commit is contained in:
2024-12-13 11:11:01 +01:00
parent 1d2190e55d
commit 14e05afdce
4 changed files with 13 additions and 11 deletions

6
read.c
View File

@@ -18,16 +18,16 @@ fileToTab2D (const char *name_file, unsigned short int **tab, const unsigned N,
case '#':
tab[x][y] = WALL;
break;
case '$':
case 'C':
tab[x][y] = BOX;
break;
case '.':
case 'I':
targets = realloc (targets, sizeof (vect) * (++nbr_targets[0]));
targets[nbr_targets[0] - 1].x = x;
targets[nbr_targets[0] - 1].y = y;
tab[x][y] = TARGET;
break;
case '@':
case 'P':
player->x = x;
player->y = y;
tab[x][y] = PLAYER;