New condition for the while
This commit is contained in:
		@ -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