From 729aeaaed7985b0e2f05ca977005c3ef64335aaa 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: Mon, 13 Nov 2023 00:16:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tank/.idea/misc.xml | 1 + Tank/Tank.iml | 11 +++++++++++ Tank/src/CountWheels.java | 2 +- Tank/src/DrawingArmoVehicle.java | 18 +++++++++--------- 4 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 Tank/Tank.iml diff --git a/Tank/.idea/misc.xml b/Tank/.idea/misc.xml index 1e4328b..5d30da4 100644 --- a/Tank/.idea/misc.xml +++ b/Tank/.idea/misc.xml @@ -1,3 +1,4 @@ + diff --git a/Tank/Tank.iml b/Tank/Tank.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Tank/Tank.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Tank/src/CountWheels.java b/Tank/src/CountWheels.java index b937e6d..dfe3b65 100644 --- a/Tank/src/CountWheels.java +++ b/Tank/src/CountWheels.java @@ -5,7 +5,7 @@ public enum CountWheels { Five(5); private final int Value; CountWheels(int Count){ - Value=Count; + Value = Count; } public int getCountWheels(){ return Value; diff --git a/Tank/src/DrawingArmoVehicle.java b/Tank/src/DrawingArmoVehicle.java index a6ca84f..dc9a434 100644 --- a/Tank/src/DrawingArmoVehicle.java +++ b/Tank/src/DrawingArmoVehicle.java @@ -22,7 +22,7 @@ public class DrawingArmoVehicle { ArmoVehicle = new EntityArmoVehicle(speed, weight, bodyColor, _numWheel); Random random = new Random(); - switch (random.nextInt(0, 3)) { + switch(random.nextInt(0, 3)) { case 0: OrnamentsForm = new DrawingWheelsCombination(); break; @@ -54,19 +54,19 @@ public class DrawingArmoVehicle { _startPosY = Math.min(y, _pictureHeight - _TankHeight); } - public int GetPosX() { + public int GetPosX () { return _startPosX; } - public int GetPosY() { + public int GetPosY () { return _startPosY; } - public int GetWidth() { + public int GetWidth () { return _TankWidth; } - public int GetHeight() { + public int GetHeight () { return _TankHeight; } @@ -95,19 +95,19 @@ public class DrawingArmoVehicle { switch (direction) { //влево case Left: - _startPosX -= (int) ArmoVehicle.Step; + _startPosX -= (int)ArmoVehicle.Step; break; //вверх case Up: - _startPosY -= (int) ArmoVehicle.Step; + _startPosY -= (int)ArmoVehicle.Step; break; // вправо case Right: - _startPosX += (int) ArmoVehicle.Step; + _startPosX += (int)ArmoVehicle.Step; break; //вниз case Down: - _startPosY += (int) ArmoVehicle.Step; + _startPosY += (int)ArmoVehicle.Step; break; } }