ligne sort plus

This commit is contained in:
2026-02-16 19:04:07 +01:00
parent 647276be0d
commit da1962145a

View File

@@ -50,6 +50,11 @@ public class Ligne extends ObjetGraphique{// Hérite de la classe ObjetGraphique
// définition d'un nouveau segment // définition d'un nouveau segment
dx = (Math.random()*20)+80; dx = (Math.random()*20)+80;
dy = (Math.random()*60)-30; dy = (Math.random()*60)-30;
if (y + dy < 0 || y + dy > 600) {
dy = -dy;
}
s = new Segment(x,y,dx,dy); s = new Segment(x,y,dx,dy);
s.setCouleur(new Color(0.2f,0.2f,0.2f)); s.setCouleur(new Color(0.2f,0.2f,0.2f));