format
This commit is contained in:
33
main.c
33
main.c
@@ -1,28 +1,29 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include "display.h"
|
||||
#include "function.h"
|
||||
#include "read.h"
|
||||
#include "display.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#define SIZE_PLAY 24
|
||||
|
||||
int main()
|
||||
int
|
||||
main ()
|
||||
{
|
||||
vect *playerPos = (vect *)malloc(sizeof(vect));
|
||||
vect *playerPos = (vect *)malloc (sizeof (vect));
|
||||
vect *targets;
|
||||
int nbr_targets;
|
||||
score playerScore;
|
||||
playerScore.before = time(NULL);
|
||||
unsigned short int **tab2d = creatArea2D(SIZE_PLAY);
|
||||
targets = fileToTab2D("test.txt", tab2d, SIZE_PLAY, playerPos, &nbr_targets);
|
||||
screenDisplay(tab2d, SIZE_PLAY);
|
||||
inGameLoop(tab2d, SIZE_PLAY, playerPos, targets, nbr_targets);
|
||||
playerScore.before = time (NULL);
|
||||
unsigned short int **tab2d = creatArea2D (SIZE_PLAY);
|
||||
targets
|
||||
= fileToTab2D ("test.txt", tab2d, SIZE_PLAY, playerPos, &nbr_targets);
|
||||
screenDisplay (tab2d, SIZE_PLAY);
|
||||
inGameLoop (tab2d, SIZE_PLAY, playerPos, targets, nbr_targets);
|
||||
|
||||
|
||||
playerScore.after = time(NULL);
|
||||
printf("%ld\n", playerScore.after - playerScore.before);
|
||||
free2D(tab2d, SIZE_PLAY);
|
||||
free(playerPos);
|
||||
free(targets);
|
||||
playerScore.after = time (NULL);
|
||||
printf ("%ld\n", playerScore.after - playerScore.before);
|
||||
free2D (tab2d, SIZE_PLAY);
|
||||
free (playerPos);
|
||||
free (targets);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user