New condition for the while
This commit is contained in:
parent
d37059b7de
commit
fbd214bc23
@ -24,7 +24,7 @@ public class Piece extends Shape{
|
||||
super(matrix);
|
||||
Random rand = new Random();
|
||||
color = new Color(rand.nextDouble(), rand.nextDouble(), rand.nextDouble(), 1);
|
||||
while(color.equals(color(255, 255, 255))) {
|
||||
while(color.equals(Color.WHITE)) {
|
||||
color = new Color(rand.nextDouble(), rand.nextDouble(), rand.nextDouble(), 1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user