Skip to content
Snippets Groups Projects
Commit 65477863 authored by EL GAOUAL Zaid's avatar EL GAOUAL Zaid
Browse files

RandomColorGenerator

parent 51c56a9d
No related branches found
No related tags found
No related merge requests found
package model;
import javafx.scene.paint.Color;
import java.util.List;
import java.util.Random;
public class RandomColorGenerator implements ColorGenerator{
private List<Color>colors;
private Random randomGenerator;
public RandomColorGenerator(List<Color> colors, Random randomGenerator){
this.colors=colors;
this.randomGenerator=randomGenerator;
}
@Override
public Color nextColor(Cell cell) {
return colors.get(randomGenerator.nextInt(colors.size()));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment