Avoid too bright colors #74
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user