w.drawCircle(x, y, i);
w.msleep(20);
}
- w.setColor("white");
+ w.setColor("skyblue");
for (i = 0; i < maxray; i++) {
w.drawCircle(x, y, i);
w.msleep(10);
largeurMont = frand(largeurMin, largeurMax);
hauteurMont = frand(hauteurMin, hauteurMax);
wnd = frand(-30, 30);
- w.setBgColor("white");
+ w.setBgColor("skyblue");
w.clearGraph();
dessineTerrain(w, largeurMont, hauteurMont);
dessineChateau(w, positionChateau1);
vy += ay * dt;
w.msleep(10);
- w.setColor("white");
+ w.setColor("skyblue");
w.fillCircle(wx, wy, 2);
// w.setColor("black");
// w.drawPoint(wx, wy);
} 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);