-
Notifications
You must be signed in to change notification settings - Fork 2
/
Cenario.h
49 lines (35 loc) · 902 Bytes
/
Cenario.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef CENARIO_H_INCLUDED
#define CENARIO_H_INCLUDED
#include "general.h"
#include "Defesa.h"
#include "Tiro.h"
typedef struct nodeTiro nodeTiro;
typedef struct nodeDefense nodeDefense;
struct nodeTiro
{
Tiro *tiro;
nodeTiro *next;
} ;
struct nodeDefense
{
Defense *defense;
nodeDefense *next;
} ;
/*Inicializa o cenario e as duas listas ligadas*/
void initCenario();
/*Recebe o tiro já pronto, uma vez que ele é gerado
por tiro.c/defesa.c e não aleatoriamente*/
void includeTiro(Tiro *tiro);
/*Recebe os parâmetros gerados aleatoriamente, cria as structs
(ponto, defense) e inclui na lista*/
void includeDefense(Defense *d);
void imprimeCenario();
/*Libera todas as defesas, tiros e as listas ligadas*/
void freeCenario();
void freeListaTiros();
void freeListaDefesas();
void createDefense();
int update();
extern nodeTiro *tiroList;
extern nodeDefense *defenseList;
#endif