Files
Sokoban/main.c

24 lines
565 B
C

#include <stdio.h>
#include "function.h"
#include "display.h"
#include "read.h"
int main()
{
vect *playerPos = (vect *)malloc(sizeof(vect));
vect *targets = malloc(sizeof(vect));
int nbr_targets;
unsigned short int **tab2d = creatArea2D(32);
targets = fileToTab2D("test.txt", tab2d, 32, playerPos, &nbr_targets);
screenDisplay(tab2d, 32);
printf("%d, %d\n", playerPos->x, playerPos->y);
for (int i = 0;i < nbr_targets; ++i) {
printf("%d, %d\n", targets[i].x, targets[i].y);
}
inGameLoop(tab2d,playerPos);
free(playerPos);
return 0;
}