From 107ff418db5795c7dcdeb68d3af1eb3416b49f8a Mon Sep 17 00:00:00 2001 From: prodigygirl Date: Sat, 22 Oct 2022 22:50:30 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BE=D1=80=D0=B4=D0=B8=D0=BD=D0=B0=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/DrawingArmoredCar.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/DrawingArmoredCar.java b/src/main/java/DrawingArmoredCar.java index 5e25e8b..7766833 100644 --- a/src/main/java/DrawingArmoredCar.java +++ b/src/main/java/DrawingArmoredCar.java @@ -1,4 +1,5 @@ import java.awt.*; +import java.util.HashMap; import java.util.Random; public class DrawingArmoredCar { @@ -120,4 +121,14 @@ public class DrawingArmoredCar { startPosY = pictureHeight - carHeight; } } + + public HashMap GetCurrentPosition() + { + HashMap hashMap = new HashMap(); + hashMap.put("Left", startPosX); + hashMap.put("Right", startPosX + carWidth); + hashMap.put("Top", startPosY); + hashMap.put("Bottom", startPosY + carHeight); + return hashMap; + } }