Hi Guys,
I need ideas about how to move an object (a circle which represents a robot in my application).
The surface the object will be moving on consists of Tiles of BufferedImage of 3 rows and 3 columns ( represented in arrays). All the Tiles are equal in sizes (160 X 160).The 3rd row and the 3rd column are the track rails on which the object must be moving on. It means that the object(robot) can move horizontal (forward and backward) and vertical (upwards and downwards). The Tile at the position [2][2] (please am counting from top. so the top row will be 0 the next afterward is 1 etc.. ) is a crossing which the robot will use to change to the vertical track rails or to the horizontal track rails.
My problem now is how to move the object to a specific Tile after the crossing has turned. For instance the robot will be in the Tile at position [2][1] and want to move to the tile at position [1][2] after the crossing is turned and then move further upwards. Or it can be at [1][2] and want to move to [2][1] after the crossing is turned and then move further backwards .
How can i move the robot from one Tile to another Tile? Which way can i refer to a specific Tile in the BufferedImage that i can place the object. All what i want is give me the ideas how i can do it.
Please this is my first time of doing such project so forgive me if my question is too elementary. With your explanation and help i will learn more from it.
Thank you very much.