Borschevskaya A.A. Lab Work 2 Hard #2

Merged
eegov merged 16 commits from lab2 into lab1 2022-11-07 10:48:13 +04:00
Showing only changes of commit 107ff418db - Show all commits

View File

@ -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<String, Float> GetCurrentPosition()
{
HashMap<String, Float> hashMap = new HashMap<String, Float>();
hashMap.put("Left", startPosX);
hashMap.put("Right", startPosX + carWidth);
hashMap.put("Top", startPosY);
hashMap.put("Bottom", startPosY + carHeight);
return hashMap;
}
}