Skip to content
Snippets Groups Projects
Commit d324c2b1 authored by SAIDI Hatim's avatar SAIDI Hatim
Browse files

test

parent 45a1e5e8
Branches
No related tags found
No related merge requests found
...@@ -10,15 +10,22 @@ import javafx.scene.paint.Color; ...@@ -10,15 +10,22 @@ import javafx.scene.paint.Color;
public class CyclicColorGenerator implements ColorGenerator { public class CyclicColorGenerator implements ColorGenerator {
private List<Color> colors ; private List<Color> colors ;
private int appels;
public CyclicColorGenerator(List<Color> colors){ public CyclicColorGenerator(List<Color> colors){
this.colors = colors; this.colors = colors;
this.appels = appels+1;
} }
public Color nextColor(Cell cell){ public Color nextColor(Cell cell){
Color color= colors.get(0); CyclicColorGenerator cyclicColorGenerator = new CyclicColorGenerator(new ArrayList<>());
return color; while(cyclicColorGenerator.appels <=this.colors.size()){
return colors.get(cyclicColorGenerator.appels-1);
}
cyclicColorGenerator.appels = 0;
return colors.get(cyclicColorGenerator.appels);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment