forked from HeiBK201/Projet_S3_L2SPI_Zombie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
carte2.c
69 lines (57 loc) · 785 Bytes
/
carte2.c
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "Outilcpy.h"
#include "CreaCarte.h"
int mat[T][T];
int carte[T][T];
void creerRoute2()
{
//Creation des routes
int i;
int j;
//routes verticales de gauche à droite
for(i=3;i<=10;i++){
j=2;
mat[i][j] = 1;
}
mat[6][4]=1;
for(i=0;i<=3;i++){
j=5;
mat[i][j] = 1;
}
for(i=5;i<=9;i++){
j=6;
mat[i][j] = 1;
}
for(i=3;i<=7;i++){
j=9;
mat[i][j] = 1;
}
//routes horizontales de haut en bas
for(j=0;j<=9;j++){
i = 3;
mat[i][j]=1;
}
for(j=4;j<=6;j++){
i=5;
mat[i][j]=1;
}
for(j=2;j<=4;j++){
i = 7;
mat[i][j]=1;
}
for(j=6;j<=8;j++){
i = 7;
mat[i][j]=1;
}
for(j=2;j<=10;j++){
i = 9;
mat[i][j]=1;
}
}
void carte2()
{
initialisation(mat);
initialisation(carte);
creerRoute2();
voisinRoute();
placerBatiment();
}