Skip to content
Snippets Groups Projects
Commit a290a085 authored by dragapsy's avatar dragapsy
Browse files

Tache 4 (La methode nextColor(Cell cell)).

parent b636444a
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,9 @@ public class UniformExceptOneGenerator implements ColorGenerator{
private Color uniColor;
private Color excepColor;
private int counter=0;
public UniformExceptOneGenerator(Color uniformColor, Color exceptionColor){
this.uniColor=uniformColor;
......@@ -13,6 +16,9 @@ public class UniformExceptOneGenerator implements ColorGenerator{
}
@Override
public Color nextColor(Cell cell) {
return null;
counter++;
if(counter==2){
return this.uniColor;
}
return this.excepColor; }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment