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; + } }