Return coordinates of a tank

118 Views Asked by At

I have written some code to move a tank to specific point. First I've made a wall stick and programmed it to find out when the tank moves to the bottom-left. The tank's coordinate is (18,18), but when I use getWidth() and getHeight() function it returns the tank's width and height - which is (40, 40).

I think when the tank moves to the bottom-left, the coordinate should be (getWidth()/2, getHeight()/2). What am I doing wrong here?

0

There are 0 best solutions below