New condition for the while
This commit is contained in:
1 parent
d37059b7de
commit
fbd214bc23
1 file changed
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user