|
|
@ -75,7 +75,7 @@ public class Cell extends Object
|
|
|
|
int height = (int) (-50 + Math.random()*101);
|
|
|
|
int height = (int) (-50 + Math.random()*101);
|
|
|
|
while (width < 20 && width > -20) width = (int) (-50 + Math.random()*101);
|
|
|
|
while (width < 20 && width > -20) width = (int) (-50 + Math.random()*101);
|
|
|
|
while (height < 20 && height > -20) height = (int) (-50 + Math.random()*101);
|
|
|
|
while (height < 20 && height > -20) height = (int) (-50 + Math.random()*101);
|
|
|
|
newcell = new Cell(xval + width, yval + height, new Color(255, 0, 0, 100));
|
|
|
|
newcell = new Cell(xval + width, yval + height, new Color(255, 0, 0));
|
|
|
|
//stages = new ArrayList<Integer>();
|
|
|
|
//stages = new ArrayList<Integer>();
|
|
|
|
//stages.add(10 + (int) Math.random() * 3 - 1);
|
|
|
|
//stages.add(10 + (int) Math.random() * 3 - 1);
|
|
|
|
//stages.add(7 + (int) Math.random() * 3 - 1);
|
|
|
|
//stages.add(7 + (int) Math.random() * 3 - 1);
|
|
|
@ -86,14 +86,14 @@ public class Cell extends Object
|
|
|
|
yval -= height;
|
|
|
|
yval -= height;
|
|
|
|
currentStage = 0;
|
|
|
|
currentStage = 0;
|
|
|
|
currentTime = 1;
|
|
|
|
currentTime = 1;
|
|
|
|
myColor = new Color(255, 0, 0, 100);
|
|
|
|
myColor = new Color(255, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
this.currentStage ++;
|
|
|
|
this.currentStage ++;
|
|
|
|
this.currentTime = 0;
|
|
|
|
this.currentTime = 0;
|
|
|
|
if(currentStage == 1) myColor = new Color(255, 255, 0, 100);
|
|
|
|
if(currentStage == 1) myColor = new Color(255, 255, 0);
|
|
|
|
if(currentStage == 2) myColor = new Color(0, 255, 0, 100);
|
|
|
|
if(currentStage == 2) myColor = new Color(0, 255, 0);
|
|
|
|
if(currentStage == 3) myColor = new Color(0, 0, 255, 100);
|
|
|
|
if(currentStage == 3) myColor = new Color(0, 0, 255);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return newcell;
|
|
|
|
return newcell;
|
|
|
|