Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
.
[graphlib.git] / chateaux / chateaux.cpp
index b6c26e2..ee53fdb 100644 (file)
@@ -286,18 +286,18 @@ int jeu1(DrawingWindow& w)
         } 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) {
-            x0 = positionChateau1 + 8;
+            x0 = positionChateau1 + 0.8 * largeurChateau;
         } else {
-            x0 = positionChateau2 - 8;
+            x0 = positionChateau2 - 0.8 * largeurChateau;
             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);