Turing Games Katy Evergreen Competing 75th Annual Turing Games Arena Rectangular Surrounde Q30419778

The Turing Games

Katy Evergreen is competing in the 75th Annual Turing Games. Thearena is rectangular and surrounded on all sides by impassablewalls. The arena is also filled with numerous impassable obstacles.Katy must capture the flag to win the Turing Games. Write a programin a language of your choice that helps Katy reach the flag byfinding the shortest path there. The rules of the Turing Games areas follows: The input for your program will be a file read fromstandard input. The first line of input will contain two floatingpoint numbers: the arena’s width (or maximum x dimension) and thearena’s length (or maximum y dimension). The second line of inputwill contain two floating point numbers: (x, y) coordinates showingKaty’s starting point. The third line of input will contain twofloating point numbers: (x, y) coordinates showing where the flagis located. The flag will be located within the arena and will notbe within the bounds of an obstacle. Next will be 1 to infinitylines containing series of (x, y) coordinate pairs. Each line willcontain at least three pairs. These pairs represent the coordinatesof the corners of the various obstacles in the arena. Each obstacleis an impassable convex polygon with at least three sides. Inputwill end with EOF.

Below is a sample input file (bold text is explanatory only andwill not be in the file):

1024 4096 arena’s boundaries

110 19 (x, y) coordinates of Katy’s startingpoint

1023 4090 (x, y) coordinates of the flag

1000 900 1000 1000 800 900 triangle-shapedobstacle (3 pairs)

501 600 501 700 423 650 423 600 four-sidedobstacle

Paste screenshots of the code and successful execution for eachprogram

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *