Project: Robotic Random Walk Simulation

Project: Robotic Random Walk Simulation

A circle is inscribed in a square as shown below. Darts are randomly thrown into the square

1661_Figure.png

Robotic Random Walk Simulation. Write a program that will implement the following tasks:

1. A robot starts at the origin.

2. Every dart in quadrant I will make the robot move 0.1 ft in the x-direction.

3. Every dart in quadrant II will make the robot move 0.1 ft in the y-direction.

4. If the robot reaches the east wall say: “Hit the east wall!!!”, and stop the dart throwing.

5. If the robot reaches the north wall say: “Hit the north wall!!!”, and stop the dart throwing.

6. Every dart in quadrant III will make the robot move -0.1 ft in the x-direction.

7. Every dart in quadrant IV will make the robot move -0.1 ft in the y-direction.

8. If the robot reaches the west wall say: “Hit the west wall!!!”, and stop the dart throwing.

9. If the robot reaches the south wall say: “Hit the south wall!!!”, and stop the dart throwing.

10. Display the coordinates of the robot’s path in the command window.

11. Draw the path of the robot superimposed on the dartboard.

Order from us and get better grades. We are the service you have been looking for.