Select Git revision
UniformExceptOneGenerator.java
Forked from
TRAVERS Corentin / flooding-template
Source project has a limited visibility.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
UniformExceptOneGenerator.java 547 B
package model;
import javafx.scene.paint.Color;
public class UniformExceptOneGenerator implements ColorGenerator{
private Color uniColor;
private Color excepColor;
private int counter=0;
public UniformExceptOneGenerator(Color uniformColor, Color exceptionColor){
this.uniColor=uniformColor;
this.excepColor=exceptionColor;
}
@Override
public Color nextColor(Cell cell) {
counter++;
if(counter==2){
return this.excepColor;
}
return this.uniColor; }
}