Borschevskaya A.A. Lab Work 2 Hard #2
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user