TASK: Program Reeborg to run a mile long super hurdles race. (Recall that eight blocks equal one mile.) The super hurdles course is similar to the hurdle race, but here the barriers can be one, two, or three blocks high. The figure below shows one sample initial situation, where Reeborg’s final situation and path are indicated on the right.
IMPLEMENTATION NOTES: Model your program after the hurdles
race example from lecture; this is an exercise in adaptive maintenance. A file
containing the hurdles race code from lecture is available in $PUB/superstart.py
Use only the Python statements covered so far; this corresponds to items #1
through #14 of the ”Reeborg the Robot Programming Summary”. (Do NOT
use any looping constructs. Also, do NOT use any recursion; that is,
1
no functions call themselves.) Do all your work in the OLA directory. Use
as your source file name ”superhurdles.py”.
TEST SITUATIONS: The situation (world) you will use in testing your
program is ”superhurdles.wld”, which can be copied from $PUB using the command
(Although you will be testing your program only against this one situation,
your program logic must be able to complete the task under ALL legal initial situations to be considered correct. In other words, your program should correctly
run any mile long super hurdles race, regardless of barrier placement.)
Get Free Quote!
322 Experts Online