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
Update.
[graphlib.git]
/
chateaux
/
chateaux.cpp
diff --git
a/chateaux/chateaux.cpp
b/chateaux/chateaux.cpp
index
9238389
..
89de6bd
100644
(file)
--- a/
chateaux/chateaux.cpp
+++ b/
chateaux/chateaux.cpp
@@
-22,6
+22,8
@@
const float hauteurMax = 130;
const float largeurMin = 40;
const float largeurMax = 150;
const float largeurMin = 40;
const float largeurMax = 150;
+const float ventMax = 30;
+
const float largeurChateau = 8.5;
const float hauteurChateau = 7;
const float largeurChateau = 8.5;
const float hauteurChateau = 7;
@@
-40,8
+42,8
@@
float largeurMont;
float hauteurMont;
float wnd;
float hauteurMont;
float wnd;
-/* Retourne un nombre pseudo-aléatoire compris entre
0 et
le paramètre
- * 'max' (exclus)
+/* Retourne un nombre pseudo-aléatoire compris entre le paramètre
+ * 'm
in' (inclus) et le paramètre 'm
ax' (exclus)
*/
float frand(float min, float max)
{
*/
float frand(float min, float max)
{
@@
-202,7
+204,7
@@
void initialise(DrawingWindow& w)
{
largeurMont = frand(largeurMin, largeurMax);
hauteurMont = frand(hauteurMin, hauteurMax);
{
largeurMont = frand(largeurMin, largeurMax);
hauteurMont = frand(hauteurMin, hauteurMax);
- wnd = frand(-
30, 30
);
+ wnd = frand(-
ventMax, ventMax
);
w.setBgColor("skyblue");
w.clearGraph();
dessineTerrain(w, largeurMont, hauteurMont);
w.setBgColor("skyblue");
w.clearGraph();
dessineTerrain(w, largeurMont, hauteurMont);