int nbilles=7; Systeme sys; void setup(){ size(600,400); sys=new Systeme(nbilles); sys.init(); } void loop(){ sys.afficher(); } class Systeme { Bille[] table; int nb;float angle,chocx,chocy; public Systeme(int nb) { this.nb = nb; this.angle=0; this.chocx=0; this.chocy=0; this.table =new Bille[nb]; init(); } void init() { for (int i = 0; i275-r) {jaune(vx,vy); _x = 275-r; vx *= -1; } if (_x<-275+r) {jaune(vx,vy); _x = -275+r; vx *= -1; } if (_y>250-r) {jaune(vx,vy); _y = 250-r; vy *= -1; } if (_y<-250+r) {jaune(vx,vy); _y = -250+r; vy *= -1; } } void jaune(float a,float b){ rouge=255;vert=255;bleu=0; lesysteme.chocx+=a/50;lesysteme.chocy+=b; } void choc() { for (int i = 0; i