Select Git revision
Cloud.class.uniqueId0
Forked from
COUETOUX Basile / FirefighterStarter
Source project has a limited visibility.
-
BACHTARZI Imed eddine authored
Mountain DONE
BACHTARZI Imed eddine authoredMountain DONE
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
AbstractShape.java 758 B
package shape;
import javafx.geometry.Point2D;
import java.util.ArrayList;
import java.util.List;
import javafx.scene.canvas.GraphicsContext;
public abstract class AbstractShape implements Shape {
private List<Point2D> points = new ArrayList<>();
public void addPoints(Point2D... points){//Point2D... refere a plusieurs points
for(Point2D point:points) { // utilise la boucle vu que je dois ajouter tous les points
this.points.add(point); //this.points refere a la liste
}
}
public int pointsCount(){ //nombre total de points
return points.size();
}
public Point2D point(int index){
return points.get(index);
}
public abstract void draw(GraphicsContext graphicsContext);
}