Dolgov D.A. Hard Lab Work 1 #1
@ -2,8 +2,8 @@ import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
public class EntityPlane {
|
||||
private int Speed;
|
||||
private float Weight;
|
||||
private int Speed = 0;
|
||||
private float Weight = 0;
|
||||
private Color BodyColor;
|
||||
|
||||
public int getSpeed(){return Speed;}
|
||||
@ -16,7 +16,13 @@ public class EntityPlane {
|
||||
{
|
||||
Random rand = new Random();
|
||||
if (speed <= 0) speed = rand.nextInt(350, 550);
|
||||
else {
|
||||
Speed = speed;
|
||||
};
|
||||
if (weight <= 0) weight = rand.nextFloat(350, 550);
|
||||
else {
|
||||
Weight = weight;
|
||||
}
|
||||
BodyColor = bodyColor;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user