New condition for the while
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Mat 2023-05-17 23:59:40 +02:00
parent d37059b7de
commit fbd214bc23

View File

@ -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);
}
}