A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
graphlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[graphlib.git]
/
chateaux
/
chateaux.cpp
diff --git
a/chateaux/chateaux.cpp
b/chateaux/chateaux.cpp
index
c5bb60f
..
ee53fdb
100644
(file)
--- a/
chateaux/chateaux.cpp
+++ b/
chateaux/chateaux.cpp
@@
-166,7
+166,7
@@
void dessineExplosion(DrawingWindow& w, float rx, float ry)
w.drawCircle(x, y, i);
w.msleep(20);
}
w.drawCircle(x, y, i);
w.msleep(20);
}
- w.setColor("
whit
e");
+ w.setColor("
skyblu
e");
for (i = 0; i < maxray; i++) {
w.drawCircle(x, y, i);
w.msleep(10);
for (i = 0; i < maxray; i++) {
w.drawCircle(x, y, i);
w.msleep(10);
@@
-201,7
+201,7
@@
void initialise(DrawingWindow& w)
largeurMont = frand(largeurMin, largeurMax);
hauteurMont = frand(hauteurMin, hauteurMax);
wnd = frand(-30, 30);
largeurMont = frand(largeurMin, largeurMax);
hauteurMont = frand(hauteurMin, hauteurMax);
wnd = frand(-30, 30);
- w.setBgColor("
whit
e");
+ w.setBgColor("
skyblu
e");
w.clearGraph();
dessineTerrain(w, largeurMont, hauteurMont);
dessineChateau(w, positionChateau1);
w.clearGraph();
dessineTerrain(w, largeurMont, hauteurMont);
dessineChateau(w, positionChateau1);
@@
-241,7
+241,7
@@
int tir(DrawingWindow& w,
vy += ay * dt;
w.msleep(10);
vy += ay * dt;
w.msleep(10);
- w.setColor("
whit
e");
+ w.setColor("
skyblu
e");
w.fillCircle(wx, wy, 2);
// w.setColor("black");
// w.drawPoint(wx, wy);
w.fillCircle(wx, wy, 2);
// w.setColor("black");
// w.drawPoint(wx, wy);
@@
-286,18
+286,18
@@
int jeu1(DrawingWindow& w)
} else {
alpha = frand(10, 90);
v0 = frand(10, 100);
} else {
alpha = frand(10, 90);
v0 = frand(10, 100);
- std::cout << " [ " <<
alpha << " ; " <<
v0 << " ]\n";
+ std::cout << " [ " <<
(int )alpha << "° ; " << (int )
v0 << " ]\n";
}
alpha = deg2rad(alpha);
float x0;
if (joueur == 1) {
}
alpha = deg2rad(alpha);
float x0;
if (joueur == 1) {
- x0 = positionChateau1 +
8
;
+ x0 = positionChateau1 +
0.8 * largeurChateau
;
} else {
} else {
- x0 = positionChateau2 -
8
;
+ x0 = positionChateau2 -
0.8 * largeurChateau
;
alpha = PI - alpha;
}
alpha = PI - alpha;
}
- float y0 =
8
;
+ float y0 =
hauteurChateau + 1
;
perdant = tir(w, x0, y0, v0, alpha, x, y);
dessineExplosion(w, x, y);
dessineVent(w, wnd);
perdant = tir(w, x0, y0, v0, alpha, x, y);
dessineExplosion(w, x, y);
dessineVent(w, wnd);