From 37b37b1fa17c81150bcca3420e9ebb27890fa849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=91=D0=B5=D0=BB?= =?UTF-8?q?=D1=8F=D0=BD=D0=B8=D0=BD?= Date: Wed, 13 Sep 2023 18:53:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=B3=D1=80=D1=83=D0=B7=D0=BA?= =?UTF-8?q?=D0=B0=201=20=D0=BB=D0=B0=D0=B1=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tank/src/DrawingTank.java | 1 + Tank/src/EntityTank.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Tank/src/DrawingTank.java b/Tank/src/DrawingTank.java index 2d2d5f7..1f363ce 100644 --- a/Tank/src/DrawingTank.java +++ b/Tank/src/DrawingTank.java @@ -120,6 +120,7 @@ public class DrawingTank { g2.drawPolygon(xPointsGun,yPointsGun,nPointsGun); g2.fillPolygon(xPointsGun,yPointsGun,nPointsGun); } + public void ChangeBorders(int width,int height) { _pictureWidth = width; diff --git a/Tank/src/EntityTank.java b/Tank/src/EntityTank.java index 5b36178..37840a1 100644 --- a/Tank/src/EntityTank.java +++ b/Tank/src/EntityTank.java @@ -17,7 +17,6 @@ public class EntityTank { public float Step; public void Init(int speed, float weight, Color bodyColor){ - Random rnd = new Random(); Speed = speed <= 0 ? rnd.nextInt(50)+10 : speed; Weight = weight <= 0 ? rnd.nextInt(100)+500 : weight;