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

Tache 4 (Testé + rectification).

parent c9015f81
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ public class DistinctColorGenerator implements ColorGenerator { ...@@ -19,7 +19,7 @@ public class DistinctColorGenerator implements ColorGenerator {
for (Color color : this.colors) { for (Color color : this.colors) {
boolean cellNotUsed = true; boolean cellNotUsed = true;
for (Cell newCell : neighbours) { for (Cell newCell : neighbours) {
if (color==cell.getColor()) if (color==newCell.getColor())
{ cellNotUsed = false; } { cellNotUsed = false; }
} }
if (cellNotUsed == true) { if (cellNotUsed == true) {
......
...@@ -18,7 +18,7 @@ public class UniformExceptOneGenerator implements ColorGenerator{ ...@@ -18,7 +18,7 @@ public class UniformExceptOneGenerator implements ColorGenerator{
public Color nextColor(Cell cell) { public Color nextColor(Cell cell) {
counter++; counter++;
if(counter==2){ if(counter==2){
return this.uniColor; return this.excepColor;
} }
return this.excepColor; } return this.uniColor; }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment