Выгрузка 1 лабы
This commit is contained in:
parent
fb10dd3a4a
commit
37b37b1fa1
@ -120,6 +120,7 @@ public class DrawingTank {
|
|||||||
g2.drawPolygon(xPointsGun,yPointsGun,nPointsGun);
|
g2.drawPolygon(xPointsGun,yPointsGun,nPointsGun);
|
||||||
g2.fillPolygon(xPointsGun,yPointsGun,nPointsGun);
|
g2.fillPolygon(xPointsGun,yPointsGun,nPointsGun);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeBorders(int width,int height)
|
public void ChangeBorders(int width,int height)
|
||||||
{
|
{
|
||||||
_pictureWidth = width;
|
_pictureWidth = width;
|
||||||
|
@ -17,7 +17,6 @@ public class EntityTank {
|
|||||||
public float Step;
|
public float Step;
|
||||||
|
|
||||||
public void Init(int speed, float weight, Color bodyColor){
|
public void Init(int speed, float weight, Color bodyColor){
|
||||||
|
|
||||||
Random rnd = new Random();
|
Random rnd = new Random();
|
||||||
Speed = speed <= 0 ? rnd.nextInt(50)+10 : speed;
|
Speed = speed <= 0 ? rnd.nextInt(50)+10 : speed;
|
||||||
Weight = weight <= 0 ? rnd.nextInt(100)+500 : weight;
|
Weight = weight <= 0 ? rnd.nextInt(100)+500 : weight;
|
||||||
|
Loading…
Reference in New Issue
Block a user