Avoid too bright colors #74

Merged
tonitch merged 1 commits from Anti-White-Propaganda into master 2023-05-18 22:51:07 +02:00

View File

@ -21,7 +21,8 @@ public class Piece extends Shape{
public Piece(boolean[][] matrix) {
super(matrix);
Random rand = new Random();
color = new Color(rand.nextDouble(), rand.nextDouble(), rand.nextDouble(), 1);
// the %.8 is there to avoid pieces that are too "white" so that we can see them
color = new Color(rand.nextDouble()%.8, rand.nextDouble() %.8, rand.nextDouble()%.8, 1);
}
public void setColor(Paint p){