I need to create a robot simulation with grid map and a robot (which takes up 4 grid) and have to simulate it moving in the map.

My idea originally is:to create 4 robot class object, each with methods like setTileX, setTileY, getTileX, getTileY for the purpose of getting the row and col of the position of the robot.And for each object, I wanted to set background as yellow (So total there are 4 grid of yellow on the map simulating the robot), and every time "Down" button is pressed (using key listener), the object will move 1 level down.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org